How to export chart data table from impress

Is there a way to export the data table from a chart to a csv or a calc file?

All I can see is edit data table, and I can’t even select all and copy, I have to go one by one.

Is there an easy way to do it?

image description

I never use impress, and can’t talk based on special experience therefore.
But it’s the same with Draw: Charts created in Impress or in Draw are very poor.
I can’t imagine a case where I would go this way:
Charts should be created in Calc from actual data. You then can easily Copy/Paste to Draw (Impress) or also to Writer, and the Data will be transferred automatically to an internal data table.
From the original source in a sheet you can export the data by simple means to every format.
If you lost the original data, there is currently no tool to export the data table from a “castrated” chart, afaik.
To write a custom program for the purpose shouldn’t be too complicated, however.

Having pasted the chart into an empty spreadsheet (first sheet of a Calc document), and having selected the containing shape, the below posted (extremely crude!) code will copy the contained data to a cell range starting at A2:

Sub exportChartDataToSheetRange()
da = ThisComponent.CurrentSelection(0).EmbeddedObject.Component.data.Data
uR = Ubound(da) : uC = Ubound(da(0))
rg = ThisComponent.Sheets(0).getCellRangeByPosition(0, 1, uC, uR + 1)
rg.setDataArray(da)
End Sub

This is awesome thanks,
By trying to understand your code and figure out a way to get the axis data also, I found this:
https://wiki.documentfoundation.org/Macros/General/003/fr

Its a French website probably why I couldn’t find it just by googling my question, but the code will create a new spreadsheet and copy all the data there.

Thanks again

Found this solution:
https://wiki.documentfoundation.org/Macros/General/003/fr

It will create a new spreadsheet and copy the data there.