Skip to content

Commit

Permalink
Upgrade Calamine
Browse files Browse the repository at this point in the history
This commit upgrade calamine in order to benefit from recent
developments, e.g. ignore annotations in column headers (see
tafia/calamine#467 for reference).
  • Loading branch information
schrieveslaach committed Nov 21, 2024
1 parent d8c2493 commit a288562
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 7 deletions.
62 changes: 56 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ brotli = "6.0"
byteorder = "1.5"
bytes = "1"
bytesize = "1.3"
calamine = "0.24.0"
calamine = "0.26.1"
chardetng = "0.1.17"
chrono = { default-features = false, version = "0.4.34" }
chrono-humanize = "0.2.3"
Expand Down
17 changes: 17 additions & 0 deletions crates/nu-command/tests/format_conversions/ods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,20 @@ fn from_ods_file_to_table_select_sheet() {

assert_eq!(actual.out, "SalesOrders");
}

#[test]
fn from_ods_file_to_table_select_sheet_with_annotations() {
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"
open sample_data_with_annotation.ods --raw
| from ods --sheets ["SalesOrders"]
| get SalesOrders
| get column4
| get 0
"#
));

// The Units column in the sheet SalesOrders has an annotation and should be ignored.
assert_eq!(actual.out, "Units");
}
Binary file not shown.

0 comments on commit a288562

Please sign in to comment.