Create chart from CSV with macro

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Jim Julian
Posts: 8
Joined: Mon Oct 17, 2016 5:51 pm

Create chart from CSV with macro

Post by Jim Julian »

I have csv files going back ten years and most follow a fixed format.

I've been loading and graphing the data in a chart that overlays the data. I'm happy with this. This is the way I store the data and in odd format.

My recent effort to create a macro to do the job, failed.
The recorder does not include chart formatting or creation.
Disk I/O are also excluded. The recorded macro opens the chart tool and goes directly to the save dialog, when done.

Are there any tools for batch processing csv files in Open Office? I'm aware of grep and sed but neither creates charts.

Thanks.
Last edited by MrProgrammer on Sun Feb 16, 2025 4:57 pm, edited 6 times in total.
Reason: Remove [Solved] tag
Open Office 4.1.2; Windows 10 Pro
User avatar
MrProgrammer
Moderator
Posts: 5258
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Create chart from CSV with macro

Post by MrProgrammer »

Jim Julian wrote: Tue Nov 19, 2024 8:34 pm My recent effort to create a macro to do the job, failed.
You will find examples of creating a chart with a macro in the Macros and UNO API forum where I moved your post. There is a Search this forum box at the top of that forum's page. Perhaps you can find a topic where the chart is similar to the one you want to create. I do not offer to help with writing macros.

Jim Julian wrote: Tue Nov 19, 2024 8:34 pm Are there any tools for batch processing csv files …?
Perl and Comprehensive Perl Archive Network provide methods to read and write CSV. This processing is external to OpenOffice.

Jim Julian wrote: Tue Nov 19, 2024 8:34 pm I'm aware of grep and sed but neither creates charts.
Gnuplot can create charts in batch. This processing is external to OpenOffice.
Gnuplot demo gallery

Summary: You do not need OpenOffice to create charts from CSV files. Questions about the usage of Perl or Gnuplot are beyond the scope of this forum.

If this solved your problem please go to your first post use the Edit ✏️ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.5, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Post Reply