umya-spreadsheet
umya-spreadsheet copied to clipboard
`get_hyperlink()` doesn't work in combination with `get_lazy_read_sheet_cells()`
When getting cells lazily, hyperlinks don't seem to be read. For example, this works:
let book = umya_spreadsheet::reader::xlsx::read(path.clone())?;
let sheet = book.get_sheet(&0).unwrap();
let cells = sheet.get_collection_by_row(&2);
let links = cells
.iter()
.filter_map(|cell| {
cell.get_hyperlink().map(|hl| hl.get_url().to_string())
})
.collect::<Vec<_>>();
dbg!(links);
But this does not:
let book = umya_spreadsheet::reader::xlsx::lazy_read(path.as_ref())?;
let sheet = book.get_lazy_read_sheet_cells(&0).unwrap();
let cells = sheet.get_collection_by_row(&2);
let links = cells
.iter()
.filter_map(|cell| {
cell.get_hyperlink().map(|hl| hl.get_url().to_string())
})
.collect::<Vec<_>>();
dbg!(links);