tags:

views:

198

answers:

1

Hello,

I have more than one Excel Workbooks containing multiple worksheets in each of them.

I would like to have a macro which help me to create (combine the information from) all the worksheets into one pipe [|] delimited [.csv] file.

These sheets should be combined/appended into the [.csv] file, in the same order these worksbooks appear in a folder and in the order sheets appear in these workbooks.

The macro should ask for a delimiter/separator specific to me and the input and output path based on my selection.

It would be great if the output [.csv] file is names as "foldername" + "Output.csv"

Thank you,

Best Regards - AJ

A: 

here are some way s to save a file as a csv file.

    filedir = "C:\etc"
    BookNm = "TheNameOfMyNewCSVFile"

    Set NewBook = Workbooks.Add
    With NewBook
        .SaveAs filename:=filedir & Booknm, FileFormat:=xlCSV, CreateBackup:=False
    End With

' or '

    ActiveWorkbook.SaveAs filename:=filedir & BookNm, FileFormat:=xlCSV, CreateBackup:=False

You should edit your question to tell us what your specific problem is.

Ommit