LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft office report package

Hi Guys,

 

Im new to LabeVIEW but a colleague and I are working on an automated monitoring project with our company.

We have the Microsoft office report package however I am looking for a few simple examples or tutorials explaining their use.

 

I seen that the below 2 examples were available at one point but now seem to be dead.

 

  • labview\examples\office\Excel Reports.llb\Generate Report From Template (Excel).vi

  • labview\examples\office\Word Reports.llb\Generate Report From Template (Word).vi

 

Can anyone help?

 

Thanks,

Seamus

0 Kudos
Message 1 of 13
(4,541 Views)

Hi Seamus,

 

Welcome to the National Instruments discussion forums!

 

I have found a number of resources which may be of use to you as a starting point:

Creating a Report in Microsoft Excel Using the LabVIEW Report Generation Toolkit: Introduction https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x3gcCAA&l=en-US

 

 

With regards to the two examples you specify, I have attached a ZIP file containing the entire 'office' folder. 

Please let me know if you require these for older LabVIEW versions etc.

Regards,
Chris (CLED, CLA, CTA)
Applications Engineering Specialist
0 Kudos
Message 2 of 13
(4,502 Views)

The Report Generation Toolkit has improved a lot by the addition of Report Classes.  I originally "inherited" some code in LabVIEW 7.0 trying to read and write Excel spreadsheets -- it wasn't pretty, nor easy.  I've recently recoded this in LabVIEW 2012 -- not only is it much cleaner and more logical code, it runs much faster, and you can do most of what you want/need without delving into ActiveX.

 

What kind of Report are you doing?  I recently wrote a VI to analyze some data, and created an HTML report (mainly because it was so easy to do, and could easily be read without needing Office).  Here's how it works:

  • Use New Report, wiring in HTML.  This gives you the Report Object wire.
  • Make a title or page header using Set Report Header Text.
  • I made "Section Headings" by using New Report Line (to create space from the previous Section), Append Report Text (with my Section Heading), and another New Report Line to set the heading off.
  • Ordinary lines of text were written using Append Report Text, with an optional New Report Line if needed.
  • If I wanted a bulleted list (like you see here), I used Append List to Report (specifying the Unordered option).
  • When I finish, I Save the Report to File (which gives it a File Name) followed by Dispose Report (which releases its interface and disposes of the Report Object wire).

All of the inputs are strings of text.  If you need to write numeric data, you can use the Format As String functions to make the line for you.

 

Bob Schor

0 Kudos
Message 3 of 13
(4,496 Views)

Hi Chris,

 

thanks fot the help. I will work through these examplea nd hopefully they will have what I need.

 

one other thing I was hoping you might be able to help me with is hte following:

 

we are using LabVIEW 2010. a former Collogue created quite an extensive LabVIEW program a few years ago when we had labVIEW 2009.

from looking through his program there are some elements of it that would be very useful to our project.

 

is there any way we can convert over some of his VI's to 2010

 

Thanks,

Seamus

0 Kudos
Message 4 of 13
(4,475 Views)

Hi Seamus,

 

You can simply open older version VIs in later versions of LabVIEW (with some limitations on 'bigger' version differences): 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YSO4CAO&l=en-US

 

As you are only going forward by one version you should see no issues in opening and using the VIs.

 

It is also possible to save VIs in an older version of LabVIEW:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YGiHCAW&l=en-US

Regards,
Chris (CLED, CLA, CTA)
Applications Engineering Specialist
0 Kudos
Message 5 of 13
(4,471 Views)

HI Bob,

 

thanks for the info. im not sure the HTML will work in this case.

It might work for some of the more simplier items we require but we have alot of data to log and we want to be able to generate graphs and run some stats etc. so perhaps excel is the better option?

 

Again I am new to this so I'm not sure how to best approach it, although the HTML option does sound relatively simple.

 

Regards,

Seamus

0 Kudos
Message 6 of 13
(4,470 Views)

Hi Bob,

 

I am Seamus' colleague.

The report we are looking to create takes information from a 1D array in the VI and inserts it into an Excel spreadsheet.

The VI takes measurements every 15 minutes and displays it in the array. What we are hoping to do is simply insert the array of measurements taken every 15 minutes

into an excel spreadsheet and to also timestamp each measurement.

 

Thank you for assistance.

 

Kieran

0 Kudos
Message 7 of 13
(4,449 Views)

Hi Chris,

 

I am Seamus's work colleauge. We could not open the VIs in Labview 2010, I would appreciate it if you could create them for Labview 2010.

What we are trying to achieve is to log a DC voltage every 15 minutes in an excel file format.

We are currently taking 4 individual DC measurements in an array on the front panel of a VI. We would like to know what is the simplest way to contiuously log these measurements for the duration of a test period?

 

Regards,

Kieran

 

0 Kudos
Message 8 of 13
(4,419 Views)

Hi Kieran,

 

Please accept my apologies for the delayed response. 

I Have converted the llb files into a earlier version and you should now be able to open them.

Please let me know if you have any difficulties.

Regards,
Chris (CLED, CLA, CTA)
Applications Engineering Specialist
0 Kudos
Message 9 of 13
(4,389 Views)

Hi Chris,

 

Thanks for your response and for transferring the VIs into 2010.

I can give you an overview to our problem

 

1: We wish to create a file path in Excel

2. We then wish to log data/ DC voltage measurements every 5 mins or so.

The excel file will have 2 columns, a column for the date and time of the measurement and the 2nd column will be for the value of the measurement.

3. Each time a measurement is taken, the time it was taken and the measurement value will be logged in the file, so basically we will have a list of time stamps and corresponding measurements..

4 The VI will continue to log the measurements until it is stopped and all the measurements will be saved in the designated excel file.

 

Thanks again,

Kieran

0 Kudos
Message 10 of 13
(4,377 Views)