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
Solved! Go to Solution.
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.
Nitzz (Kudos are always Welcome, Mark as a solution if it is the One;))
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
I am glad that you figured it out. By the way, even for Excel report you need to have the MS Office RG Toolkit.
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
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:
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.
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?
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.