-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Description
v0.42.0
function makeBordersForRow(rowNumber, columnCount, worksheet) {
for (let i = 1; i <= columnCount; i++) {
worksheet.getRow(rowNumber).getCell(i).border = {
top: { style:'thin', color: { argb:'000000' } },
left: { style:'thin', color: { argb:'000000' } },
bottom: { style:'thin', color: { argb:'000000' } },
right: { style:'thin', color: { argb:'000000' } }
};
}
}
const maxColumns = 10;
const maxRows = 20;
for (let rowNum = 1; rowNum < maxRows; rowNum++) {
makeBordersForRow(rowNum, maxColumns, worksheet);
}
This code is supposed to put black borders to 20 rows on 10 columns, however, the borders don't stop at row 20, they get applied to all rows (10 columns still).
I've seen this happen with font styles as well, however, I found out that using the .values = []
operation resets the styles.
cs4inctec