I am using Microsoft Interop to convert excel files to csv files. I am using the sheet.SaveAs function.
My original excel sheet has data from columns A1 to AZ for 100 rows. I need in CSV only data from A1 to AP and only for 50 lines.
Using the Range function, I delete line 51-100, I clear the contents for the same lines, but when I save the CSV, I find lines 51-100, as shown below: (just commas). I do not want to see these commas in CSV.
,,,,,,,,,,,,,,,,,,,,,,,,,
The same goes for the AQ-AZ column. I do not need this data in CSV. I delete, clear the contents using the Range function, but these AQ-AZ columns are displayed in CSV files as ",,,,,,,,,,,".
Is there a way to save XLS as CSV with the only range I want to see in the CSV file. Is there a way to control the range that goes into the CSV file?
In short, I want to see in the CSV file only the data for column A1 in AP for 50 rows. No empty trailing "," s. Is there any way?