Skip to content

Commit d8f6575

Browse files
fix(datagrid-web): export birth year as string in Excel output
1 parent 6757af1 commit d8f6575

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/pluggableWidgets/datagrid-web/e2e/DataGrid.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ test.describe("datagrid-web export to Excel", () => {
2020
// Read file and convert to JSON.
2121
const workbook = XLSX.readFile("./e2e/downloads/testFilename.xlsx");
2222
const worksheet = workbook.Sheets[workbook.SheetNames[0]];
23-
const jsonData = XLSX.utils.sheet_to_json(worksheet);
23+
const jsonData = XLSX.utils.sheet_to_json(worksheet, { raw: false });
2424

2525
expect(jsonData).toHaveLength(50);
2626

2727
expect(jsonData[0]).toEqual({
2828
"Birth date": "2/15/1983",
29-
"Birth year": 1983,
29+
"Birth year": "1983",
3030
"Color (enum)": "Black",
3131
"First name": "Loretta"
3232
});
3333

3434
expect(jsonData[1]).toEqual({
3535
"Birth date": "9/30/1970",
36-
"Birth year": 1970,
36+
"Birth year": "1970",
3737
"Color (enum)": "Red",
3838
"First name": "Chad"
3939
});

0 commit comments

Comments
 (0)