To download NI software, including the products shown below, visit ni.com/downloads.
LvOO - Cross platform brige between Labview and PyOO (Python interface to OpenOffice & LibreOffice API)
LvOO - wrapper library for generating OpenOffice & LibreOffice spreadsheet documents via LabView python node.
The main goal of the library – support both Windows and Linux versions of LabView, using only internal python node only (no .NET, no ActiveX).
It uses PyOO module created by Miloslav Pojman (firstname.lastname@example.org) - https://github.com/mila/pyoo
"PyOO wraps a robust OpenOffice(LibreOffice) Python-UNO bridge to simple and Pythonic interface"
Not all features, implemented in PyOO, are supported yet.
lvoo create session.vi – initialization routine. Input variables:
lvoo generate spreadsheet.vi – open or create spreadsheet, transfer cells data, save and close Calc document or leave it opened. Input variables:
lvoo destroy session.vi – dummy close session vi, not really needed.
LabView type of "sheets” data input - collection of spreadsheet document sheets represented by array of clusters. Each cluster consists of array of cells and sheet name.
If sheet name is not empty, current sheet will be renamed, otherwise leaved default. Array of cells consists of clusters representing single cell.
This cluster contains row number, column number and data. Data is LabView Variant data type. You can connect numeric and string values. Other types not tested yet.
Installation on Windows:
Install preferred Office system. You can use OpenOffice or LibreOffice, but not the both simultanously. By default Office on Windows include its own python interpreter. Manuals recommend using interpreter included to Office pack, instead of python, installed on your system. All office stuff is in the "c:\Program Files (x86)\LibreOffice(or OpenOffice 4)\program" directory. This is main entrance point for the library, which contains soffice.exe itself, python interpreter and its modules.
Besides this, LabView python node needs to know the path to interpreter. You can add it manually to system PATH variable. A little script, included in this project, can do it for you automatically, but only in the user section of environmental variables. One reboot is required for normal python node working after changing oo_path variable and starting lvoo create session.vi! This script also automatically finds the installed python version.
Installation on Linux:
Tested on OpenSUSE Leap 15.1. LibreOffice and Python 3.6 preinstalled on this release. Library is working “out of the box”. No system environmental variables changes required.
version 0.0.4 17.01.2023
Copyright (c) 2023 Dmitry Lebedev email@example.com
This library is released under the MIT license. See the LICENSE file.
PyOO module Miloslav Pojman (firstname.lastname@example.org) - https://github.com/mila/pyooRelated-Separate-2
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.