Jump to content

[CR] LibreOffice Simple LV interface

Recommended Posts

LibreOffice Simple LV interface

A set of simple VIs that uses the LibreOffice / OpenOffice UNO API. The result is very similar to MS Office ActiveX API. Currently, only Calc is supported. 


This was tested on Windows 8 with LV2013 64 bit and LibreOffice 64 bit.



  • Submitter
  • Submitted
  • Category
  • LabVIEW Version
  • License Type


Link to comment
  • 1 month later...

Just trying the 'Uno_test.vi' example on Labview 2014 / Windows 7 / LibreOffice Having trouble right off with error code 1172 from the 'Bootstrap' invoke node in  'Create Factory' vi. This is being fed with a .net reference set to 'uno.util.Bootstrap'. If I try and create a similar node, I don't get that resource in the drop-down list.


Sounds like I haven't installed or set all I need to with LibreOffice. What did you install and set (paths etc) on your computer please?


I'm interested in this because I wrote a small test executive that uses Excel for all data storage. I got pretty good creating my own Excel interface and would like to add LibreOffice support to that. I'd attempted to do that via COM but never got it installed right / LibreOffice doesn't support COM - I never fully fathomed that out.


Regards, Bob

Edited by Bob W Edwards
Link to comment
  • 1 year later...
  • 1 year later...
  • 5 weeks later...

Hi Gribo,

Thank you very much for this interface. I was looking for something like that for a long time.

However, I get the error 1172 System.Runtime.InteropServices.SEHException when I run your script. This error comes from the Bootsrtap.

I use Labview2018_x64 or Labview2017_x64, LibreOffice_6.0.4.2_x64 and LibreOffice_6.0.4.2_x64_SDK on a Win10_x64 computer.

Do you have any idea where does this error come from and how to fix it?

I set the environment variables:

OFFICE_PROGRAM_PATH = C:\Program Files\LibreOffice\program

UNO_PATH = C:\Program Files\LibreOffice


Thank you!

Link to comment

I don't have access to LV2017. This error usually means that it can't find the Uno DLLs. IIRC, The UNO path should point to C:\Program Files\LibreOffice\program

Edit: The UNO_PATH variable is case sensitive. Make sure it has the exact case as above.

Edited by Gribo
Link to comment
  • 3 weeks later...

Hi Gribo,


I finally managed to get it work by setting the correct UNO_PATH + computer reboot!!

Thank yo very much for all your work done on that subject and for sharing it with the community. It helps a lot, saving precious time...


All the best!

Link to comment
  • 5 months later...

Any tips on what I should research/learn to understand how I can add a chart through LabVIEW?

I was able to get all VIs working in both LV 2015 32bit and LV 2018 64bit using version 6.0 Libreoffice.

I'm at the point of developing the library more but not sure where to start.



Edited by David C. Li
Link to comment

Hi Gribo,

Thanks for the guidance!

On that website, I followed this example: https://api.libreoffice.org/examples/DevelopersGuide/Charts/CalcHelper.java under the Charts Example section.

They casted a specific XSpreadsheet to a XTableChartsSupplier.class. Then used the getCharts() method to return a collection of charts and then used the addNewByName method to add  a new chart to that collection with the arguments (sChartName, aRect, aAddresses, true, false)


I was able to create the charts and embedded it into the specific spreadsheet but they defaulted to bar charts.

After the charts are created I was planning on formatting them to a different chart type, and also adding titles, axis names etc.. What do you think about this method? Any downsides?


Also let me know if my understanding or terminology is flawed. I haven't programmed in Java in years, and I do not fully understand the API yet.



Edited by David C. Li
Link to comment

Yeah, the VI I'm building is sort of a one-off solution. So it's a little messy but it does the job.

For future viewers of this thread. This is a good resource:


And the author has a chapter on the chart2 api here:

https://fivedots.coe.psu.ac.th/~ad/jlop/chaps/28. Chart2 API Overview.pdf


Thanks again for the prompt responses Gribo, I wouldn't have expected it for a thread from 2015 haha

If i ever clean up my library I'll add some examples to this thread.



Link to comment
  • 3 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.