diff --git a/testdata/sqllogictests/xlsx.slt b/testdata/sqllogictests/xlsx.slt index adc3839f2..e526e84bf 100644 --- a/testdata/sqllogictests/xlsx.slt +++ b/testdata/sqllogictests/xlsx.slt @@ -12,7 +12,7 @@ select count(*) from './testdata/xlsx/userdata1.xlsx'; ---- 1000 -query I +query Id select count(*) from read_excel('./testdata/xlsx/userdata1.xlsx', has_header => true); ---- 1000 @@ -156,3 +156,33 @@ select * from read_excel('./testdata/xlsx/multiple_sheets.xlsx', sheet_name => ' foo 4.0 4 4.0 5 5.0 5 5.0 bar (empty) (empty) (empty) + +query +select * from read_excel('./testdata/xlsx/tables.xlsx', sheet_name => 'table_and_named_range', table_name => 'users', has_header => true); +---- +1 alice alice@email.com +2 bob bob@email.org +3 chandra chandra@email.gov + +query +select * from read_excel('./testdata/xlsx/tables.xlsx', table_name => 'named_range', has_header => false); +---- +id number string +10 60000 foo +20 78 bar + +query +select * from read_excel('./testdata/xlsx/tables.xlsx', sheet_name => 'one_table', table_name => 'stuff'); +---- +red orange yellow +circle triangle square +cat dog mouse +pizza pasta burger + +statement error +select * from read_excel('./testdata/xlsx/tables.xlsx', sheet_name => 'abc', table_name => 'stuff'); +---- +red orange yellow +circle triangle square +cat dog mouse +pizza pasta burger \ No newline at end of file diff --git a/testdata/xlsx/tables.xlsx b/testdata/xlsx/tables.xlsx new file mode 100644 index 000000000..d0c431d39 Binary files /dev/null and b/testdata/xlsx/tables.xlsx differ