|
|
@@ -192,6 +192,20 @@ function SearchBox<T extends string>({ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const firstTableData = [ |
|
|
|
['Column1', 'Column2', 'Column3'], // Row 1 |
|
|
|
['Data1', 'Data2', 'Data3'], // Row 2 |
|
|
|
// ... more rows as needed |
|
|
|
]; |
|
|
|
// Find the last row of the first table |
|
|
|
let lastRowOfFirstTable = 5; // Starting row for data in the first table |
|
|
|
while (worksheet[XLSX.utils.encode_cell({ c: 0, r: lastRowOfFirstTable })]) { |
|
|
|
lastRowOfFirstTable++; |
|
|
|
} |
|
|
|
|
|
|
|
// Insert the first data form into the worksheet at the desired location |
|
|
|
XLSX.utils.sheet_add_aoa(worksheet, firstTableData, { origin: { c: 0, r: lastRowOfFirstTable } }); |
|
|
|
|
|
|
|
// Format filename with date |
|
|
|
const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD |
|
|
|
const filename = `AR06_Project_Completion_Report_with_Outstanding_Un-billed_Hours_${today}.xlsx`; // Append formatted date to the filename |
|
|
|