DOS batch to save xls file as csv

November 11, 2010 at 13:32:21
Specs: Windows XP
Does anybody know if there is a way to program a batch to open an excel file (xls or xlsx) and save it as csv without human intervention?
I have files that some end users do not save the file correctly (numbers appear in the exponential form when they need to be integer) so I am trying to automate this and keep the integrity of the data.
I will appreciate any help.

See More: DOS batch to save xls file as csv

Report •

November 11, 2010 at 17:16:51
Would a macro work for you?

If you put this in the ThisWorkbook module, it will convert all cells to a basic Number format with no decimal places whenever the workbook is saved.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
 Cells.NumberFormat = "0"
End Sub

Posting Tip: Before posting Data or VBA Code, read this How-To.

Report •
Related Solutions

Ask Question