some code v5
#[tokio::main] async fn main()->Result<()> { let m = read_excel("abc.xlsx", 1, "Sheet1").unwrap(); let ctx = SessionContext::new(); ctx.register_table("abc", Arc::new(m))?; let df = ctx.sql("select * from abc").await?; let d = df.collect().await?; let dr = d.as_slice().get(0).unwrap().columns(); let col1 = dr.get(0).unwrap(); let sch = df.schema(); let fields = sch.fields(); let firtfireld = fields.get(0).unwrap(); println!("{:?}", firtfireld.field().data_type()); println!("{:?},", col1); Ok(()) }