ExcelMapper
ExcelMapper copied to clipboard
What is the best way to clear all data rows?
Hello.
We load an excel file with a header and potentially already existing datarows. Mappings are added, and finally the excel will be saved with a collection of data-objects. We noticed that for the data-rows that were already present in the file, values do not get updated. What is the best way to load a file and clear all datarows while keeping the header, before saving with new data?
I tried SaveAsync with an empty collection, before doing SaveAsync with my actual collection. This appears to work, but I'm hoping there is a better solution?
Greetings
Can you elaborate on your use case, perhaps also with a code snippet and a demo Excel file?