@@ -151,14 +151,6 @@ function SearchBox<T extends string>({ | |||
}); | |||
}); | |||
// Apply calculated widths to each column, skipping column A | |||
worksheet['!cols'] = colWidths.map((width, index) => { | |||
if (index === 0) { | |||
return { wch: 8 }; // Set default or specific width for column A if needed | |||
} | |||
return { wch: width + 2 }; // Add padding to width | |||
}); | |||
// Style for cell A1: Font size 16 and bold | |||
if (worksheet['A1']) { | |||
worksheet['A1'].s = { | |||
@@ -202,6 +194,14 @@ function SearchBox<T extends string>({ | |||
while (worksheet[XLSX.utils.encode_cell({ c: 0, r: lastRowOfFirstTable })]) { | |||
lastRowOfFirstTable++; | |||
} | |||
// Apply calculated widths to each column, skipping column A | |||
worksheet['!cols'] = colWidths.map((width, index) => { | |||
if (index === 0) { | |||
return { wch: 8 }; // Set default or specific width for column A if needed | |||
} | |||
return { wch: width + 2 }; // Add padding to width | |||
}); | |||
// Format filename with date | |||
const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD | |||
@@ -151,14 +151,6 @@ function SearchBox<T extends string>({ | |||
}); | |||
}); | |||
// Apply calculated widths to each column, skipping column A | |||
worksheet['!cols'] = colWidths.map((width, index) => { | |||
if (index === 0) { | |||
return { wch: 8 }; // Set default or specific width for column A if needed | |||
} | |||
return { wch: width + 2 }; // Add padding to width | |||
}); | |||
// Style for cell A1: Font size 16 and bold | |||
if (worksheet['A1']) { | |||
worksheet['A1'].s = { | |||
@@ -202,6 +194,14 @@ function SearchBox<T extends string>({ | |||
while (worksheet[XLSX.utils.encode_cell({ c: 0, r: lastRowOfFirstTable })]) { | |||
lastRowOfFirstTable++; | |||
} | |||
// Apply calculated widths to each column, skipping column A | |||
worksheet['!cols'] = colWidths.map((width, index) => { | |||
if (index === 0) { | |||
return { wch: 8 }; // Set default or specific width for column A if needed | |||
} | |||
return { wch: width + 2 }; // Add padding to width | |||
}); | |||
// Format filename with date | |||
const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD | |||
@@ -151,14 +151,6 @@ function SearchBox<T extends string>({ | |||
}); | |||
}); | |||
// Apply calculated widths to each column, skipping column A | |||
worksheet['!cols'] = colWidths.map((width, index) => { | |||
if (index === 0) { | |||
return { wch: 8 }; // Set default or specific width for column A if needed | |||
} | |||
return { wch: width + 2 }; // Add padding to width | |||
}); | |||
// Style for cell A1: Font size 16 and bold | |||
if (worksheet['A1']) { | |||
worksheet['A1'].s = { | |||
@@ -202,6 +194,14 @@ function SearchBox<T extends string>({ | |||
while (worksheet[XLSX.utils.encode_cell({ c: 0, r: lastRowOfFirstTable })]) { | |||
lastRowOfFirstTable++; | |||
} | |||
// Apply calculated widths to each column, skipping column A | |||
worksheet['!cols'] = colWidths.map((width, index) => { | |||
if (index === 0) { | |||
return { wch: 8 }; // Set default or specific width for column A if needed | |||
} | |||
return { wch: width + 2 }; // Add padding to width | |||
}); | |||
// Format filename with date | |||
const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD | |||
@@ -151,14 +151,6 @@ function SearchBox<T extends string>({ | |||
}); | |||
}); | |||
// Apply calculated widths to each column, skipping column A | |||
worksheet['!cols'] = colWidths.map((width, index) => { | |||
if (index === 0) { | |||
return { wch: 8 }; // Set default or specific width for column A if needed | |||
} | |||
return { wch: width + 2 }; // Add padding to width | |||
}); | |||
// Style for cell A1: Font size 16 and bold | |||
if (worksheet['A1']) { | |||
worksheet['A1'].s = { | |||
@@ -202,6 +194,14 @@ function SearchBox<T extends string>({ | |||
while (worksheet[XLSX.utils.encode_cell({ c: 0, r: lastRowOfFirstTable })]) { | |||
lastRowOfFirstTable++; | |||
} | |||
// Apply calculated widths to each column, skipping column A | |||
worksheet['!cols'] = colWidths.map((width, index) => { | |||
if (index === 0) { | |||
return { wch: 8 }; // Set default or specific width for column A if needed | |||
} | |||
return { wch: width + 2 }; // Add padding to width | |||
}); | |||
// Format filename with date | |||
const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD | |||
@@ -151,14 +151,6 @@ function SearchBox<T extends string>({ | |||
}); | |||
}); | |||
// Apply calculated widths to each column, skipping column A | |||
worksheet['!cols'] = colWidths.map((width, index) => { | |||
if (index === 0) { | |||
return { wch: 8 }; // Set default or specific width for column A if needed | |||
} | |||
return { wch: width + 2 }; // Add padding to width | |||
}); | |||
// Style for cell A1: Font size 16 and bold | |||
if (worksheet['A1']) { | |||
worksheet['A1'].s = { | |||
@@ -202,6 +194,14 @@ function SearchBox<T extends string>({ | |||
while (worksheet[XLSX.utils.encode_cell({ c: 0, r: lastRowOfFirstTable })]) { | |||
lastRowOfFirstTable++; | |||
} | |||
// Apply calculated widths to each column, skipping column A | |||
worksheet['!cols'] = colWidths.map((width, index) => { | |||
if (index === 0) { | |||
return { wch: 8 }; // Set default or specific width for column A if needed | |||
} | |||
return { wch: width + 2 }; // Add padding to width | |||
}); | |||
// Format filename with date | |||
const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD | |||
@@ -151,14 +151,6 @@ function SearchBox<T extends string>({ | |||
}); | |||
}); | |||
// Apply calculated widths to each column, skipping column A | |||
worksheet['!cols'] = colWidths.map((width, index) => { | |||
if (index === 0) { | |||
return { wch: 8 }; // Set default or specific width for column A if needed | |||
} | |||
return { wch: width + 2 }; // Add padding to width | |||
}); | |||
// Style for cell A1: Font size 16 and bold | |||
if (worksheet['A1']) { | |||
worksheet['A1'].s = { | |||
@@ -205,6 +197,14 @@ function SearchBox<T extends string>({ | |||
// Insert the first data form into the worksheet at the desired location | |||
XLSX.utils.sheet_add_aoa(worksheet, firstTableData, { origin: { c: 0, r: lastRowOfFirstTable } }); | |||
// Apply calculated widths to each column, skipping column A | |||
worksheet['!cols'] = colWidths.map((width, index) => { | |||
if (index === 0) { | |||
return { wch: 8 }; // Set default or specific width for column A if needed | |||
} | |||
return { wch: width + 2 }; // Add padding to width | |||
}); | |||
// Format filename with date | |||
const today = new Date().toISOString().split('T')[0].replace(/-/g, '_'); // Get current date and format as YYYY_MM_DD | |||