feat(import): support comma decimal separator for CSV/TSV

This commit is contained in:
ccq authored and GitHub committed 2026-09-29 22:15:41 +08:00
1 parent 9a1c64b9f0
commit 4269a61e2c
15 files changed
+184 -6

No files matched your search

@@ -86,6 +86,7 @@ export function tableImportProgressPercent(progress: TableImportProgressLike | n
export interface TableImportParseSettings {
format: TableImportSourceFormat;
delimiter: string;
decimalSeparator?: "." | ",";
textEncoding: TableImportTextEncoding;
titleRow: number;
dataStartRow: number;
@@ -114,6 +115,7 @@ export function buildTableImportParseOptions(settings: TableImportParseSettings)
const isTextSource = isDelimited || settings.format === "sql";
return {
delimiter: settings.format === "tsv" ? "\\t" : settings.format === "csv" ? "," : settings.delimiter,
decimalSeparator: isDelimited ? (settings.decimalSeparator ?? ".") : null,
encoding: isTextSource ? settings.textEncoding : null,
titleRow: settings.titleRow,
dataStartRow: settings.dataStartRow,