ngx-dynamic-entity 3.0.0-rc.1 → 3.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -154,11 +154,11 @@ const UPLOAD_HANDLER = new InjectionToken('UPLOAD_HANDLER');
|
|
|
154
154
|
* @example
|
|
155
155
|
* provideNgxDynamicEntity({
|
|
156
156
|
* sheetParser: async file => {
|
|
157
|
-
* const wb = XLSX.read(await file.arrayBuffer());
|
|
157
|
+
* const wb = XLSX.read(await file.arrayBuffer(), { cellDates: true });
|
|
158
158
|
* const rows = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]], {
|
|
159
|
-
* header: 1, raw:
|
|
160
|
-
* }) as
|
|
161
|
-
* return { headers: rows[0] ?? [], rows: rows.slice(1) };
|
|
159
|
+
* header: 1, raw: true, defval: '', UTC: true,
|
|
160
|
+
* }) as unknown[][];
|
|
161
|
+
* return { headers: (rows[0] ?? []).map(cellText), rows: rows.slice(1) };
|
|
162
162
|
* },
|
|
163
163
|
* })
|
|
164
164
|
*/
|