Thursday, 7 August 2008

OOBasic Export Macro Part 2: CSV

Expanding on the last blog entry, See here, using a macro to create tab delimited text files, we can modify the code easily to create csv files instead.

Replace the following two lines in the code

FileProperties(2).Value = "9,0,ANSI,1"
sExt = ".txt"

With these

FileProperties(2).Value = "44,34,ANSI"
sExt = ".csv"

This then creates a comma seperated file with .csv extention for each tab within the spreadsheet.

CSV macro... Done

No comments: