from xlsx/ods: Add parameter --sheets (#3600)

* from xlsx: Add parameter --sheets

* from ods: Add parameter --sheets
This commit is contained in:
Christian Menges
2021-06-10 14:44:24 +02:00
committed by GitHub
parent 9a2fe7ec0c
commit 500683831c
6 changed files with 118 additions and 10 deletions

View File

@ -14,3 +14,17 @@ fn from_ods_file_to_table() {
assert_eq!(actual.out, "Gill");
}
#[test]
fn from_ods_file_to_table_select_sheet() {
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"
open sample_data.ods --raw
| from ods -s ["SalesOrders"]
| get
"#
));
assert_eq!(actual.out, "SalesOrders");
}

View File

@ -14,3 +14,17 @@ fn from_excel_file_to_table() {
assert_eq!(actual.out, "Gill");
}
#[test]
fn from_excel_file_to_table_select_sheet() {
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"
open sample_data.xlsx --raw
| from xlsx -s ["SalesOrders"]
| get
"#
));
assert_eq!(actual.out, "SalesOrders");
}