In a Google Sheet LastRow always sets 567 next to row 1. Where are rows 2 to 566?

Viewed 25

I am working on a sheet and automating a process for importing CVS files kept in a directory, through App Script. Each time a CVS name file is read for the trigger, it's imported.

A Sheet's LastRow+1 value is assigned to a startRow variable to start import process. The very first process detects sheet's LastRow as 566, and imports CSV data from 567 row.

And simply rows 2 to 566 disappear!

I haven't able to establish what is happening. I send images showing this. One shows part of my code where the assigning is happening, and other showing rows number where row 567 row follows row 1 and row 2 is missing. Help me please!

enter image description here enter image description here

0 Answers
Related