LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to fill pre-defined tables in Word 2003 with test results?

Solved!
Go to solution

Hi All,

 

I have a simple test board , where i measure different DC levels,  with a simple Vi that saves the test results in to a Text file.

 

These results in text file, were manually typed in to a test report , which is a Word document with tables, but i have now created a macro in word 2003 that can take the results from text file and added to the specific rows and columns in  my word test report file.

 

The big questions is how can i get Labview to,after it has measured the DC levels, write the test results to the specific tables , rows and columns, in the Word document without deleting all?

 

The attached picture illustrates one tables , and the yellow cells showing the cells that need to be filled in with test results.

 

Labview vers: 2009

0 Kudos
Message 1 of 24
(7,757 Views)

Hi,

 

First of all, why are you generating a word report. You can use Excel instead as it has many advantages over word report. For both refer the report generation examples in the LabVIEW Example finder under printing and publishing data. You will get a good idea about how to add data into a template.

 

Regards,

 

Nitzz (Kudos are always Welcome, Mark as a solution if it is the One;))

Message 2 of 24
(7,731 Views)

Hi Nitzz

 

i know its easier with Excel but i have to use word beacuse all the previous test report were done in Word.

 

I have , by today , had contact with NI Support , and found out why i couldn`t write data to the right columns and rows. I don`t have the Report Generation Toolkit for Microsoft Office.

 

I will try get it today, if not i may look in to how i can do it in the Excel.

 

Thanks for your comment

0 Kudos
Message 3 of 24
(7,727 Views)

Hi,

 

I am glad that you figured it out. By the way, even for Excel report you need to have the MS Office RG Toolkit. 

 

Regards,


Nitzz

0 Kudos
Message 4 of 24
(7,723 Views)

ok , than its easier with Word.

 

If i want to do it in Excel , i have to use a lot of hours to do it , beacuse its a 3-pages report , with many tables, rows and columns.

than i need to get it approved and so on. 🙂

 

Have a great day

0 Kudos
Message 5 of 24
(7,721 Views)

Hi!

 

I'm a Test Engineer for electronics and I create alot of automated tests with LabVIEW. Many of our customers want testsresults in a fancy and easy-to-read report. I did not have the MS Office Report Generation tool. So I did some research in the Excel Board and came a cross a link to a free open Excel toolkit ( Link ). The toolkit looks like this in LabVIEW:Excel.png

 

As you can see, you have many tools to get the job done. I'm talking about reading, writing and formatting Excel. The toolkit uses activeX. If you give me a few minutes I'll create an example for you.

 

What I do when I create a report:

 

Step 1. Create a template with all your formatting, macros, images and colors. Name the file for example "template.xlsx" (or .xls if you use an older office version).

Step 2. In your program, copy the file to the desired location and give it a proper name.

Step 3. Aquire some data and write it to the file you copied and renamed.

 

For my latest project I created a fully-automated testprogram for testing a electric product. After each test a report is generated based on the procedure above. After testing all the products I have for example 300 reports. I then created a program that reads all the reports and creates a summary report that contains statistics for all the tested products. In my program I can also print the reports or the summary report and deliver to our customer. All this takes just a few seconds and adds extra quality to the products we sell to our customer.

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
Message 6 of 24
(7,717 Views)

Hi Even ,

 

Thanks for your reply, I didnt knew there were a free tool for excel.

 

I have downloaded it now, but how do i install it?

0 Kudos
Message 7 of 24
(7,712 Views)

i have now installed and can see all sub vi in palette

0 Kudos
Message 8 of 24
(7,711 Views)

Hi again!

 

I have created a small example for you. Unzip this file on your Desktop. Run the VI called "Excel Report Creator.vi"

 

How to use:

1. When you run the Vi you will be prompted to select the "Template.xlsx" file. Do so and click OK.

2. Press the button called "Create Data" to create some random data. You can see the data in the 2D array on the frontpanel.

3. Press Create Report.

4. Check the folder containg the VI and template on your desktop. It should now contain a file called "My_report.xlsx".

5. Examine The template, The VI and The Report that was created. Play around and you will after a while create the most professional reports.

 

I have to do some stuff at work now, but in an hour or so I'll add more information in this thread regarding some errors that might occur and how to work around them.

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 9 of 24
(7,706 Views)

Oh... You're using Word2003. Then I gues you also use Excel 2003. I'll upload a version for that now.

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 10 of 24
(7,703 Views)