LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Darren's Occasional Nugget 09/26/2022

here is an attached xlsx that doesnt seem to work.  it is strange though because when i open it and re-save it, it works fine.

0 Kudos
Message 51 of 57
(764 Views)

That .xlsx file contains tags that I haven't seen before... more specifically, they are formatted as <x:c> instead of <c>. The file must have been saved with an older version of the Open Document standard than any of the test files I used when I originally wrote the VI.

 

Anyway, here's an updated version, it appears to read your old file fine. Let me know if you have any other issues.

Message 52 of 57
(735 Views)

thank you very much for this.  i also saw you added the "workbook2.xml" fix which i was also running into occasionally.

0 Kudos
Message 53 of 57
(685 Views)

I ran into issues opening a fairly basic xlxs file using the GitHub repo version, while @Ettep's version worked fine.

 

What I noted though, using a more advanced file, is that @Darren & @Ettep's codes don't treat cells spanning several columns and/or rows as expected, in the sense that the 2-D string array output does contain empty values where the larger cells value would be expected to be repeated.

The current codes only output the cell's content in the first "elementary" cell of a multi-row/column cell.

0 Kudos
Message 54 of 57
(229 Views)

@X. wrote:

I ran into issues opening a fairly basic xlxs file using the GitHub repo version, while @Ettep's version worked fine.

 

What I noted though, using a more advanced file, is that @Darren & @Ettep's codes don't treat cells spanning several columns and/or rows as expected, in the sense that the 2-D string array output does contain empty values where the larger cells value would be expected to be repeated.

The current codes only output the cell's content in the first "elementary" cell of a multi-row/column cell.


I would need an example xlsx-file to implement the needed changes.

 

It was fun to see how these xlsx-files work.  Some of it reminded me of the "Reveal Codes" feature used by Wordperfect.

0 Kudos
Message 55 of 57
(200 Views)

If you're dealing with OpenXML, have some fun with the  Open XML SDK 2.5 Productivity Tool · (GitHub).

 

It's an impressive (free and portable) tool.

 

It validates OpenXML files and sometimes gives details about what is wrong.

 

A great feature for a developer is that it can "diff" 2 OpenXML documents and generate C# code (using the OpenXML library) to go from one document to the other.

Message 56 of 57
(189 Views)

I am attaching a modified version that offers the option to fill in the multicell-spanning cells with their common values.

I threw in options to remove empty columns and rows for good measure (I needed this).

Quick work so user beware.

0 Kudos
Message 57 of 57
(133 Views)