LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

excel to xml to labview

Solved!
Go to solution

I don't think you can save a workbook as a XML file. I just tried with Excel 2010 and threw some test data in there (no XML tags or anything of the sort) and I got a information message that said I didn't have any XML mappings. I think you might be chasing your tail on this one.

0 Kudos
Message 21 of 23
(1,004 Views)

unfortunately it is a reqt.  It appears that Labview an Excel dont meet well in this arena.

0 Kudos
Message 22 of 23
(1,003 Views)
Solution
Accepted by topic author id

If you are using the Report Generator Toolkit, you can save your Excel spreadsheet as a file of type .xlsx, which is a zipped XML file (open it with WinZip or any other unzipper and you should be able to see the somewhat-complex XML pieces that make up Excel).

 

Having said that, I think the task of trying to work through Microsoft's implementation via XML of the Excel Workbook is something of a challenge.  The XML files, of course, contain the values contained in the Workbook, but also everything else, such as Sheet names, Print Area settings, and all the many "details" that make up the file (including formats, borders, etc.).  It might be more straight-forward to get the data into LabVIEW (either directly, assuming you aren't trying to read it from Excel, or by using the Report Generator Toolkit to read from Excel and put it into LabVIEW variables, such as 2-D arrays representing rows and columns), then writing the LabVIEW data directly into XML.

 

There are at least three LabVIEW-XML "packages" that you can try.  Each writes a slightly different form(at) of XML, with some more verbose than others, and changing what is saved as XML Tags.  They are:

  • The XML functions that ship with LabVIEW, and use the NI Schema
  • EasyXML, a package sold by JKI, and available on the LabVIEW Toolkit site (or from the VIPM repository)
  • GXML, also available on the VIPM repository, contributed by an NI Engineer

I'm assuming you know about VIPM (VI Package Manager), a free down-loadable utility that give you access to numerous packages that can "plug in" to LabVIEW and provide additional functionality.  If you don't have it, do a web search for VIPM, which should take you to the JKI website (JKI is Jim Kring's company -- he wrote the thus-far-most-comprehensive Guide/Textbook for LabVIEW).

 

I've experimented with all three packages.  I'm currently using GXML, with some "enhancements" that I've added for myself.

 

Hope this information is helpful.

 

Bob Schor

0 Kudos
Message 23 of 23
(998 Views)