Change data range on an existing calc chart w Java
I need to be able to change the data range on a calc chart.
I import an excel file for export to PDF. The excel file is injected with data before I open it, thus I don't know how long the data series will be, so I cannot set it in OpenOffice itself. (Excel ignores empty data at the end of a dataseries, but OO only has assume zero/leave gap/continue line)
I can open the file, and get to the point where I have a reference to the XChartDocument. ("Printing" to pdf is also no the problem) After this I'm lost though. I don't understand the object model well enough to know where to change the chart's data range(s). Help will be greatly appreciated.
I didn't find the right solution from the Internet.