Bug Hunting Session
Bug 43699 - Extract, copy or export Chart data tables from Charts in Writer documents
Summary: Extract, copy or export Chart data tables from Charts in Writer documents
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Chart-Data
  Show dependency treegraph
 
Reported: 2011-12-10 10:39 UTC by andis.lazdins
Modified: 2017-06-14 22:11 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
odt file containging chart (diagram) (13.77 KB, application/vnd.oasis.opendocument.text)
2012-02-14 03:02 UTC, sasha.libreoffice
Details
Sample doc file to extract data from the datatable (30.50 KB, application/msw)
2012-02-14 03:48 UTC, andis.lazdins
Details
Basic macro, which extract data from selected diagram into new spreadsheet (33.04 KB, application/vnd.oasis.opendocument.text)
2012-11-26 11:05 UTC, sasha.libreoffice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andis.lazdins 2011-12-10 10:39:05 UTC
It would be very, very great improvement to the Chart component, if it would be possible to extract somehow Chart data tables to use them separately as tables, like to add data, to do some calculations etc. Alternative option is to use separate spreadsheets to store charts, but it is not at all a good and efficient way to work.
Comment 1 sasha.libreoffice 2012-02-14 00:28:20 UTC
But chart usually generated form Calc.
Comment 2 andis.lazdins 2012-02-14 00:41:26 UTC
(In reply to comment #1)
> But chart usually generated form Calc.

Hi!

Initially yes, but then I have to keep 2 files to have access to data. And these files have to be harmonised, which is more complicated than to work with a single set of data. Sometimes those spreadsheet files gets lost and it is another problem.

It is also impossible to export charts in writer to .doc format so it is very convenient to be able to export data before saving charts as pictures so that they can be accessed somehow also in .doc files. 

I don't know if the function is so complicated to implement, but it is what users of ms word are expected to see in charts. I'm away from ms word for some 8 years, but I still feel lack of this and some other functions, like paste calc table into writer table, which was recently implemented as extension.
Comment 3 sasha.libreoffice 2012-02-14 03:02:35 UTC
Created attachment 57027 [details]
odt file containging chart (diagram)
Comment 4 sasha.libreoffice 2012-02-14 03:07:52 UTC
Thanks for explanations! Indeed, with exporting is some problem, especially to docx format.
odt file contains content of initial table, so I not see problem to create such function, IMHO even on Basic my be possible.

> paste calc table into writer table, which was recently implemented as extension
this extension was inside of OpenOffice installation or separately installed?
Comment 5 andis.lazdins 2012-02-14 03:43:53 UTC
Separately installed, it is available here http://extensions.services.openoffice.org/en/project/pasteasvalue

One of the most welcome extensions for me :)

> this extension was inside of OpenOffice installation or separately installed?
Comment 6 andis.lazdins 2012-02-14 03:48:20 UTC
Created attachment 57030 [details]
Sample doc file to extract data from the datatable

Sample file to show, how data can be extracted from a .doc file (office version - 2003). Ms word chart allow to copy / paste chart datatable as tab separated text, which can be easily transformed into table. I don't have newer versions of ms office, so may be there the system is different.
Comment 7 sasha.libreoffice 2012-02-15 01:19:51 UTC
Thanks for information
Comment 8 andis.lazdins 2012-02-15 11:38:56 UTC
Following to this. Another useful function would be ability to paste list of values into the writer chart datatable instead of rewriting values one by one, if changes are necessary. 
It is useful also if charts in writer have different formatting characteristics (fonts etc.) than in original calc file. It would take less time to copy/paste data in case of changes instead of pasting chart from calc with following changes of formatting elements in chart, starting with the anchoring.
Comment 9 sasha.libreoffice 2012-04-18 07:10:51 UTC
some workaround for extracting data in Bug 42243
Comment 10 andis.lazdins 2012-04-18 07:42:45 UTC
Thank you!

It is really not the easiest way; however, it is solution for large charts. It might be a bit tricky to find right object folder if there are some tens of charts and they are not entered in the same order as they are in document :)
Comment 11 sasha.libreoffice 2012-04-18 07:49:16 UTC
> might be a bit tricky to find right object folder
When we in newly extracted folder, there may be folders Thumbnails and ObjectReplacements. Open contents of folder Thumbnails in picture viewer or drag and drop files from folder ObjectReplacements into LibreDraw.
Comment 12 sasha.libreoffice 2012-11-26 11:05:36 UTC
Created attachment 70581 [details]
Basic macro, which extract data from selected diagram into new spreadsheet

I have created simple Basic macro which extracts data from selected diagram into new Calc spreadsheet.
(Works only if document contains real chart, not an EMF image of chart)
Comment 13 andis.lazdins 2012-11-26 11:42:15 UTC
Thank you very much for excellent work!!!

I tried the macro on several charts and it worked in all cases. It will be really useful extension to the Libreoffice.

Best regards!

(In reply to comment #12)
> Created attachment 70581 [details]
> Basic macro, which extract data from selected diagram into new spreadsheet
> 
> I have created simple Basic macro which extracts data from selected diagram
> into new Calc spreadsheet.
> (Works only if document contains real chart, not an EMF image of chart)
Comment 14 andis.lazdins 2016-11-11 06:35:27 UTC
This issue is abandoned for several years, but probably there is possibility to implement this macro into an extension or Libreoffice code. This would be really great addition.