How to write to excel continuously adding to it?
Currently everytime I write it overwrites everything…
How to write to excel continuously adding to it?
Currently everytime I write it overwrites everything…
that depends on how your writing to it.
Write Excel
… add the new rows to the datatable, don’t use a new datatable. If you are working with an existing file, read it first, add the rows, and then write itWrite Range
make sure to “move” Cells
property to the place you want to. You can use Read Range
to get lastUsedRow
and lastUsedColumn
Write Cell
then again, make sure to add the correct number of rows to write to the correct cell, You can use Read Range
to get lastUsedRow
and lastUsedColumn
before doing your loop.This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.