Skip to content

Commit

Permalink
Merge pull request #475 from simnalamburt/patch-1
Browse files Browse the repository at this point in the history
README.md: (misc) Fix example
  • Loading branch information
tafia authored Oct 30, 2024
2 parents 6e231a8 + c79e8a4 commit 1bb0b11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 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 All @@ -106,12 +106,12 @@ if let Some(Ok(r)) = excel.worksheet_range("Sheet1") {
### Reader: With header row

```rs
use calamine::{Reader, Xlsx, open_workbook};
use calamine::{HeaderRow, Reader, Xlsx, open_workbook};

let mut excel: Xlsx<_> = open_workbook("file.xlsx").unwrap();

let sheet1 = excel
.with_header_row(Some(3))
.with_header_row(HeaderRow::Row(3))
.worksheet_range("Sheet1")
.unwrap();
```
Expand Down

0 comments on commit 1bb0b11

Please sign in to comment.