This commit is contained in:
rgrgogu
2026-05-12 12:47:13 +08:00
parent 1d94f27e61
commit 6e98ff0b5d
16 changed files with 211 additions and 20 deletions
+2 -3
View File
@@ -89,12 +89,11 @@ export function exportTableToExcel({
sheetName = "Sheet1",
} = {}) {
const columns = resolveColumns(tableInstance, attributes);
const rawData = Array.isArray(selectedRows) && selectedRows.length > 0
const data = Array.isArray(selectedRows) && selectedRows.length > 0
? selectedRows
: allData;
// ─── Flatten rows so dot-notation keys resolve correctly ──────────────────
const data = rawData.map((row) => flattenRow(row, attributes));
console.log(columns, data)
exportToExcel({ data, columns, filename, sheetName });
}