[Solved] Saving multiple sheets as separate csv files

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
pixlated
Posts: 2
Joined: Wed May 04, 2016 7:30 pm

[Solved] Saving multiple sheets as separate csv files

Post by pixlated »

My ods file has 10 sheets each with the name of a subdirectory to the directory of the workbook.

How do I go about batch saving each sheet to the path [SheetName]/table.csv (including overwriting the current csv file if it exists)?

Fairly straightforward but I'm completely new to OO Basic and struggling to get my head around it.
Last edited by MrProgrammer on Thu Oct 22, 2020 1:30 am, edited 1 time in total.
Reason: Tagged ✓ [Solved]
OpenOffice 3.1 on Windows 10
User avatar
MrProgrammer
Moderator
Posts: 4909
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Saving multiple sheets as separate csv files

Post by MrProgrammer »

Hi, and welcome to the forum.
pixlated wrote:How do I go about batch saving each sheet to the path [SheetName]/table.csv (including overwriting the current csv file if it exists)?
This should get you started: [Solved] Macro to save csv in UTF8

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
pixlated
Posts: 2
Joined: Wed May 04, 2016 7:30 pm

Re: Saving multiple sheets as separate csv files

Post by pixlated »

Looks good, thanks
OpenOffice 3.1 on Windows 10
Post Reply