| @@ -192,6 +192,17 @@ 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 = 6; // Starting row for data in the first table | |||||
| while (worksheet[XLSX.utils.encode_cell({ c: 0, r: lastRowOfFirstTable })]) { | |||||
| lastRowOfFirstTable++; | |||||
| } | |||||
| // Format filename with date | // Format filename with date | ||||
| const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD | const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD | ||||
| const filename = `AR01_Late_Start_Report_${today}.xlsx`; // Append formatted date to the filename | const filename = `AR01_Late_Start_Report_${today}.xlsx`; // Append formatted date to the filename | ||||
| @@ -192,6 +192,17 @@ 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 = 6; // Starting row for data in the first table | |||||
| while (worksheet[XLSX.utils.encode_cell({ c: 0, r: lastRowOfFirstTable })]) { | |||||
| lastRowOfFirstTable++; | |||||
| } | |||||
| // Format filename with date | // Format filename with date | ||||
| const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD | const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD | ||||
| const filename = `AR02_Delay_Report_${today}.xlsx`; // Append formatted date to the filename | const filename = `AR02_Delay_Report_${today}.xlsx`; // Append formatted date to the filename | ||||
| @@ -192,6 +192,17 @@ 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 = 6; // Starting row for data in the first table | |||||
| while (worksheet[XLSX.utils.encode_cell({ c: 0, r: lastRowOfFirstTable })]) { | |||||
| lastRowOfFirstTable++; | |||||
| } | |||||
| // Format filename with date | // Format filename with date | ||||
| const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD | const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD | ||||
| const filename = `AR03_Resource_Overconsumption_${today}.xlsx`; // Append formatted date to the filename | const filename = `AR03_Resource_Overconsumption_${today}.xlsx`; // Append formatted date to the filename | ||||
| @@ -192,6 +192,17 @@ 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 = 6; // Starting row for data in the first table | |||||
| while (worksheet[XLSX.utils.encode_cell({ c: 0, r: lastRowOfFirstTable })]) { | |||||
| lastRowOfFirstTable++; | |||||
| } | |||||
| // Format filename with date | // Format filename with date | ||||
| const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD | const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD | ||||
| const filename = `AR04_Cost_and_Expense_Report_${today}.xlsx`; // Append formatted date to the filename | const filename = `AR04_Cost_and_Expense_Report_${today}.xlsx`; // Append formatted date to the filename | ||||
| @@ -192,6 +192,17 @@ 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++; | |||||
| } | |||||
| // Format filename with date | // Format filename with date | ||||
| const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD | const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD | ||||
| const filename = `AR05_Project_Completion_Report_${today}.xlsx`; // Append formatted date to the filename | const filename = `AR05_Project_Completion_Report_${today}.xlsx`; // Append formatted date to the filename | ||||
| @@ -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 | // Format filename with date | ||||
| const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD | 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 | const filename = `AR06_Project_Completion_Report_with_Outstanding_Un-billed_Hours_${today}.xlsx`; // Append formatted date to the filename | ||||