fix(export): preserve datetime precision across CSV and XLSX exports
This commit is contained in:
1 parent
ffe1e58fbb
commit
ab6a7645f6
14 files changed
+438
-43
No files matched your search
@@ -2637,6 +2637,11 @@ export async function exportQueryResultXlsx(
|
||||
rows: readonly (readonly XlsxCellValue[])[],
|
||||
numericColumnRightAlign?: boolean,
|
||||
autoFilter?: boolean,
|
||||
// Accepted for signature parity with the Tauri backend but unused: the web
|
||||
// builder writes every cell as `inlineStr`, so a temporal value keeps the
|
||||
// text the grid already formatted (milliseconds included) and never goes
|
||||
// through a `numFmt` display pattern.
|
||||
_dateTimeFormat?: string,
|
||||
): Promise<void> {
|
||||
const { buildXlsxWorkbook } = await import("@/lib/export/xlsxExport");
|
||||
const workbook = buildXlsxWorkbook({
|
||||
@@ -2672,6 +2677,7 @@ export async function exportQueryResultsXlsx(
|
||||
autoFilter?: boolean;
|
||||
}[],
|
||||
autoFilter?: boolean,
|
||||
_dateTimeFormat?: string,
|
||||
): Promise<void> {
|
||||
const { buildXlsxWorkbookMulti } = await import("@/lib/export/xlsxExport");
|
||||
const workbook = buildXlsxWorkbookMulti(autoFilter === undefined ? worksheets : worksheets.map((worksheet) => ({ ...worksheet, autoFilter })));
|
||||
|
||||
@@ -5056,6 +5056,7 @@ export async function exportQueryResultXlsx(
|
||||
rows: readonly (readonly XlsxCellValue[])[],
|
||||
numericColumnRightAlign?: boolean,
|
||||
autoFilter?: boolean,
|
||||
dateTimeFormat?: string,
|
||||
): Promise<void> {
|
||||
return invoke("export_query_result_xlsx", {
|
||||
request: {
|
||||
@@ -5067,6 +5068,7 @@ export async function exportQueryResultXlsx(
|
||||
rows,
|
||||
numericColumnRightAlign,
|
||||
autoFilter,
|
||||
dateTimeFormat,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -5083,12 +5085,14 @@ export async function exportQueryResultsXlsx(
|
||||
autoFilter?: boolean;
|
||||
}[],
|
||||
autoFilter?: boolean,
|
||||
dateTimeFormat?: string,
|
||||
): Promise<void> {
|
||||
return invoke("export_query_results_xlsx", {
|
||||
request: {
|
||||
filePath,
|
||||
worksheets,
|
||||
autoFilter,
|
||||
dateTimeFormat,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user