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!

