how to automate exporting excel worksheet to csv file

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

Looking for a way to create a macro or script to export the contents of an
excel
spreadsheet ( 6columns) to an ASCII comma separated file.
I would like to be able to script this to run weekly.
 
Looking for a way to create a macro or script to export the contents of an
excel
spreadsheet ( 6columns) to an ASCII comma separated file.
I would like to be able to script this to run weekly.

With VBA, I would do it this way:
someWorkBook.SaveAs Filename:=someFilename, FileFormat:=xlCSV

As to running it weekly: Create and schedule a VB script which runs
Excel, opens the workbook, runs the code above. Like this:

Dim objXL
Const xlCSV = 6

Set objXL = WScript.CreateObject("Excel.Application")

objXL.WorkBooks.Open "your.XLS"
objXL.DisplayAlerts = False
objXL.WorkBooks("your.XLS").SaveAs "your.CSV", xlCSV
objXL.Quit
Set objXL = Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

How to Export Gmail Emails to PST Format? 4
export to CSV file 4
excel to csv export 1
csv format is wrong in Denmark 3
CSV to ASCII 4
csv files 1
Sorting a csv 2
How to create .csv file 2

Back
Top