calamine
calamine copied to clipboard
Not all table rows are included in data()
let path = format!("{}/ctryprem.xlsx", "/tmp");
let workbook: Result<Xlsx<std::io::BufReader<std::fs::File>>, calamine::XlsxError> = open_workbook(path);
if let Ok(mut workbook) = workbook {
workbook.load_tables()?;
let tables = workbook.table_names_in_sheet("ERPs by country");
println!("Tables loaded");
println!("Defined Tables: {:?}", tables);
let table = workbook.table_by_name("Table1")?;
println!("columns: {:?}", table.columns());
println!("data {:#?}", table.data());
Missing the last 4 rows. Here's the original file https://www.stern.nyu.edu/~adamodar/pc/datasets/ctryprem.xlsx.