LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xml portion of xlsx

The new version of excel has the xlsx extension.  It ia actually a file composed of multiple xml files.  One of the xml file contains the data of the excel workbook.  Is there a way to edit just the xml containing the data portion of the xlsx? 

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 9
(2,346 Views)

You can use the zip file functions to unzip the xlsx indo a folder and get access to each individule of the many XML files including the workbook.XML file.  Labview does have a good set (although sometimes difficult to follow) standard XML Parser, you can oprn the XML and modify its content according to the workbook schema and resave it.

As for the actual syntax of the files I do not know the format but it was susposed to be some what open and published.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 2 of 9
(2,334 Views)

Any reason you don't want to use the ActiveX server interface for Excel to do this?

 

Also, this appears to be the same question you've been getting help on: http://forums.ni.com/t5/LabVIEW/Edit-data-in-XML/td-p/2019078

 

In that other question you were basically asking for help in editing an XML file. Please keep the discussion regarding editing of XML files in that thread so we don't waste our time suggesting something that has already been discussed.

0 Kudos
Message 3 of 9
(2,331 Views)

"Any reason you don't want to use the ActiveX server interface for Excel to do this?"

 

One reason is that it requires the activeX installed on the PC while the XML editor can be done purely in labview without ActiveX Object installed (I dont have office installed on some of my PCs).

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 4 of 9
(2,326 Views)

@falkpl wrote:

"Any reason you don't want to use the ActiveX server interface for Excel to do this?"

 

One reason is that it requires the activeX installed on the PC while the XML editor can be done purely in labview without ActiveX Object installed (I dont have office installed on some of my PCs).

 


Yes, obviously. I know that. But I was asking more in terms of perhaps the user doesn't know it can be done with ActiveX. Or, perhaps they know, but couldn't get it to work correctly.

 

 

EDIT: Plus, from this post, we see the user has the Report Generation Toolkit. So, I'm not sure what the real objective here is.

0 Kudos
Message 5 of 9
(2,324 Views)

AND the user has already asked this question before: http://forums.ni.com/t5/LabVIEW/Reporting-toolkit-and-XLSX-File/td-p/1969849

 

Stop creating multiple threads!

0 Kudos
Message 6 of 9
(2,320 Views)

i know that it can be done in another way.  One way is through the report generation toolkit.  However, I just wanted to know can it be done in another way.  I wanted to know is there a easy way to access the xml inside the xlsx.  That's probably not the way that I will use at the moment to solve my problem, but I am just curious.  Also, the xml question that I was asking does not relate to excel at all.  It just just a pure xml question, so I craeted another post. 

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 7 of 9
(2,309 Views)

don't you have to rename the xlsx file into a zip file before you can unzip it? 

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 8 of 9
(2,306 Views)

I dont have LV here right now but I think you can extract the xlxs into a temp file without renaming it, navagate to the workbook.xml, parse and modify the XML doc and rezip it and then rename it to an xlsx doc.  Again just a thought I cant verify it right now.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 9 of 9
(2,291 Views)