Skip to content

Commit

Permalink
README.md: (misc) Fix example
Browse files Browse the repository at this point in the history
Xlsx::worksheet_range() returns Result<T, E> not Option<Result<T, E>>
  • Loading branch information
simnalamburt authored Oct 22, 2024
1 parent 6e231a8 commit 604d4bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function.
use calamine::{Reader, Xlsx, open_workbook};

let mut excel: Xlsx<_> = open_workbook("file.xlsx").unwrap();
if let Some(Ok(r)) = excel.worksheet_range("Sheet1") {
if let Ok(r) = excel.worksheet_range("Sheet1") {
for row in r.rows() {
println!("row={:?}, row[0]={:?}", row, row[0]);
}
Expand Down

0 comments on commit 604d4bc

Please sign in to comment.