Isssue with load_tables and table_names functions
DarkwingDuck48 opened this issue · comments
Please, help me!
When I try to parse xlsx file with smart table inside, functions load_table and table_names work good.
But when I try to parse xlsx file without smart table inside the same code failed with error "Tables must be loaded before they are referenced"
let mut workbook: Xlsx<_> = open_workbook(cli.source_file).expect("Cannot open file");
// Get worksheets of a book
let worksheets: Vec<String> = workbook.sheet_names();
workbook.load_tables().unwrap();
let tables = workbook.table_names();
println!("Tables loaded");
println!("Defined Tables: {:?}", tables);
I can't figured out how to check if it is any tables in the file.
This is a legit bug.
I have a fix but I need to get a file to test on.
Closing it, one of the files we're already using for tests was exhibiting that behavior.
It works. thank you!!
Thanks for reporting the bug!