Mass saving xls as csv

Posted by korki on Stack Overflow See other posts from Stack Overflow or by korki
Published on 2010-04-02T07:34:19Z Indexed on 2010/04/02 7:43 UTC
Read the original article Hit count: 629

Filed under:
|
|

hi, here's the trick. gotta convert 'bout 300 files from xls to csv, wrote some simple macro to do it, here's the code:

Dim wb As Workbook

For Each wb In Application.Workbooks
wb.Activate

    Rows("1:1").Select
    Selection.Delete Shift:=xlUp
    ActiveWorkbook.SaveAs Filename:= _
        "C:\samplepath\CBM Cennik " & ActiveWorkbook.Name & " 2010-04-02.csv" _
        , FileFormat:=xlCSV, CreateBackup:=False
Next wb

but it doesn't do exactly what i want - saves file "example.xls" as "example.xls 2010-04-02.csv", what i need is "example 2010-04-02.csv"

need support guys ;)

© Stack Overflow or respective owner

Related posts about excel-vba

Related posts about vba