09-05-2018 05:50 AM
Does anyone know how to read the axis titles from existing excel charts, on excel sheets, using Labview? I'm guessing that this is possible with Activex, but I can't work out how to do it.
The sheets I am working with come from elsewhere (and I would rather not require them to change their format if I can avoid it) and will have two charts (or more) on the sheet. I would like to be able to get Labview to read the x and y graph axis titles on all charts on a given sheet.
I have attached a test sheet - note, this is just for testing and is not a copy of one of the real sheets, as these contain confidential information.
Thank you in advance,
David
Solved! Go to Solution.
09-05-2018 09:28 AM
It is not as straight forward as I had thought, but this seems to work.
09-07-2018 06:38 AM
Thanks Ramon,
I have been diverted onto something else temporarily ( 😞 ) - So I will try this as soon as I get back to this task. Thanks again for your help,
Kind regards,
David
09-17-2018 09:49 AM
Hi Ramon,
Thanks for your solution. It works!
I also found another way. xlsx files are simply zip files. Inside the zip files are a bunch of xml files spread through a small number of folders. Inside the folder xl\charts, inside the zip file, there are xml files for every chart - CHART1.xml ... CHARTn.xml. The axis labels are stored in these xmls files under a specific tag: XPATH //chartSpace/chart/plotArea/valAx/title/tx/rich/p/r/t.
You do need to strip out the namespaces first. See in the snippet.
09-17-2018 10:10 AM
Hi Dpak,
That seems much more straight forward. You should mark it as solution
08-26-2020 09:01 AM - edited 08-26-2020 09:03 AM
Hi Ramon,
Sorry for the delayed response - the university autumn term started and any development like this had to wait until the following summer! Nothing gets done between October and June normally - except teaching related things. And, by the summer, there were other fires ... you know how it is.
Your method using the nodes worked well enough for the project I as working on and I had that implemented quickly.
So, even though this is embarrassingly late - I wanted to respond and thank you again.