From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Random Ramblings on LabVIEW Design

Community Browser
Labels
cancel
Showing results for 
Search instead for 
Did you mean: 

Open Document Spreadsheet Tool

swatts
Active Participant

Hello My Sweets,

Way back when I started a project to make a Open Document Tool, some words can be found here.

It came grinding to a halt due to memory leaks in the xpath tool used for navigating content.xml and pressure of work.

Well .... I've only gone and cracked it.

So attached to this article is a project with the following example.

ExampleScreen.png

And the block diagram looks like this.

BlockDiagram.png

And what it does is

  1. opens a template spreadsheet (to get all the formatting, preload data etc etc).
  2. Returns Sheet names
  3. Returns Contents for a selected sheet
  4. Stores the Spreadsheet

There's also couple of methods for replacing and inserting sheets. This is restricted to strings at the mo' but there's no reason we can't add formatting/polymorphism.

This should be all we need create spreadsheets from LabVIEW (obviously we can be adding more methods).

I would like to add some word processor functionality in the coming months as another class.

It's been tested with LibreOffice and OpenOffice and one converted excel file with the help of Jarobit, but this is a pretty early release so expect surprises.

I've used the open G ZLIB tools, but these are embedded in my project and namespace protected in an LVLIB so it should sit in a project and mind its own business.

Now I need to sleep.

night night Lovelies

Late night issue fix (always the recipe for awesome software), issues 1 and 2 sorted SW 09-04-2016

12-04-2016 I think I've sussed the Excel issues, so I've included a Template.ods with some data in it too. (there is a minor untidyness with some the repeat rows of emptyness)

It's now 4M because I've added all the ZLIB stuff, my thinking being that we can trim it back down when we're happy.

13-04-2016 disappointing result on the rebuilding of the ODS file, ZLIB is unzipping empty dirs as 0 value files. This is causing me some angst as I'm struggling to get the file correct for both LibreOffice and Excel.

ODS files are slightly simpler when created by Excel, so it all works OK using the template.ods provided <-- Well Well Well it appears there's an issue with ZLIB Read Compressed File__ogtk.vi where it is extracting an empty directory.

15-04-2016 I've tidied the project and improved the example.

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

Comments