Skip to content

Commit 797d292

Browse files
refactor: Remove explicit date and cell text parsing options from Excel to CSV conversion (#1140)
2 parents bd37797 + 599202a commit 797d292

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

apps/api/src/app/shared/services/file/file.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@ export class ExcelFileService {
1313
async convertToCsv(file: Express.Multer.File, sheetName?: string): Promise<string> {
1414
return new Promise(async (resolve, reject) => {
1515
try {
16-
const wb = XLSX.read(file.buffer as any, { cellDates: true, cellText: false });
16+
const wb = XLSX.read(file.buffer as any);
1717
const ws = sheetName && wb.SheetNames.includes(sheetName) ? wb.Sheets[sheetName] : wb.Sheets[wb.SheetNames[0]];
1818
resolve(
1919
XLSX.utils.sheet_to_csv(ws, {
2020
blankrows: false,
2121
skipHidden: true,
2222
forceQuotes: true,
23-
dateNF: Defaults.DATE_FORMAT.toLowerCase(),
2423
// rawNumbers: true, // was converting 12:12:12 to 1.3945645673
2524
})
2625
);

0 commit comments

Comments
 (0)