feat(export): support XLSX comment headers

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-08-25 22:00:26 +08:00
1 parent 86f36e51ad
commit 46111850db
4 files changed
+311 -28

No files matched your search

@@ -2012,13 +2012,11 @@ async function exportDataXlsx(row: ObjectBrowserRow) {
try {
columnInfos = await api.getColumns(props.connection.id, props.database, schema || props.database, row.name, props.catalog);
const hasComments = hasXlsxHeaderComments(columnInfos.map((column) => column.comment));
const result = await showObjectBrowserXlsxHeaderDialog(hasComments);
const result = await showObjectBrowserXlsxHeaderDialog(hasXlsxHeaderComments(columnInfos.map((column) => column.comment)));
if (result === null) return;
headerMode = result;
} catch {
// Column fetch failed, fallback to export without comments
columnInfos = undefined;
// Export still works with field-name headers when column metadata is unavailable.
}
await exportTableData(row, "xlsx", columnInfos, headerMode);