Skip to content

Commit 8047205

Browse files
Or-MiOr-Mi
authored andcommitted
skip empty cell
1 parent 92a6336 commit 8047205

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/taskpane/components/App.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ const App = () => {
216216

217217
for (let row = 0; row < range.rowCount; row++) {
218218
for (let col = 0; col < range.columnCount; col++) {
219+
if (range.formulasR1C1[row][col] === "") {
220+
// Skip empty cells
221+
continue;
222+
}
219223
const address = properties.value[row][col].address;
220224
const match = address.match(/!([A-Z]+)(\d+)$/);
221225
let rowIndex = 0, columnIndex = 0; // fallback if parsing fails
@@ -512,7 +516,6 @@ const App = () => {
512516

513517
sheet_cells.untrack();
514518
await context.sync();
515-
// setWriteProcessedRows(sheetData.cells[Object.keys(sheetData.cells)[Object.keys(sheetData.cells).length - 1]].rowIndex + 1);
516519
}
517520

518521
// Rebuild the calculation engine to ensure all formulas are recalculated

0 commit comments

Comments
 (0)