You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 67dd7cd
Browse filesBrowse the repository at this point in the historyBrowse files
Warnings: the warning cap no longer drops data-loss warnings (`isDataLossWarning`, new; for example `CSV_UNTERMINATED_QUOTE`, `CSV_ROWS_TRUNCATED`, `ROWS_TRUNCATED`, `INVALID_SHARED_STRING`, `MISSING_PART`, `UNSUPPORTED_PART`); past `maxWarnings` only informational warnings are dropped, the first 100 of each data-loss code are kept, and `WARNINGS_TRUNCATED` counts what was dropped in a new `dropped` field. `parseCsv`, `readCsv`, the worker's `parseCsv` and `importDataset` take `maxWarnings` (default 1,000). `MISSING_PART`, `BROKEN_OPTIONAL_PART` and `UNSUPPORTED_PART` carry a new `partKind` naming the kind of part.
6
+
Changed past the cap: for `read`, `WARNINGS_TRUNCATED` stays where the first warning was dropped, but data-loss warnings can now follow it, so it is not necessarily the last warning and `warnings.length` can exceed `maxWarnings + 1` (by up to 100 per data-loss code); 50 invalid cell references read with `maxWarnings: 10` gave 11 warnings and now give all 50. For CSV it stays last. Under the cap, results are unchanged apart from `partKind`.
Damage the reader can recover from comes back as `warnings`. `isDataLossWarning(w)` tells the ones where data was lost (a cell skipped, rows cut, a part missing, comments or charts not read; `partKind` names the part) from informational ones; the warning cap (`limits.maxWarnings`, default 1,000) drops only informational warnings, so filtering `warnings` with it is enough to refuse a damaged file.
/** `CSV_UNTERMINATED_QUOTE`, `CSV_STRAY_QUOTE`, `CSV_FIELD_COUNT`, `CSV_INVALID_ENCODING`, `CSV_ROWS_TRUNCATED`, then `WARNINGS_TRUNCATED` if the cap dropped any (see `maxWarnings`). */
constt: ExcelWarning={code: "WARNINGS_TRUNCATED",message: `More than maxWarnings (${this.limits.maxWarnings}) warnings; later ones were dropped.`, dropped };
0 commit comments