NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

error -4110 with MS Office Report VI

I am trying to use the MS Office Report VI to open an Excel template that has two worksheets and then write information to named ranges on the two worksheets.  The VI works with no error when writing information to only the first work sheet but it I try to write to the 2nd worksheets an error -41110 occurs. Is this normal?
 
I am using LabVIEW 7.1, Report Generation Toolkit 1.1.1 and Excel 2000.
0 Kudos
Message 1 of 5
(4,993 Views)
Joch,
I looked up the error code in LabVIEW (help>>Explain Error) and it says "Report Generation Toolkit: You specified invalid Word bookmarks or Excel named ranges." Does this error make sense in your case? Does the named range exist in the second sheet?
 
Chris C 
0 Kudos
Message 2 of 5
(4,980 Views)

Cris_C.

Yes, the named range exist on the 2nd worksheet. The only thing that makes any sense is that I found a message thread in this forum that was started on 03-01-2006 where someone named Darren mentions that "a limitation of the MS Office Report Express VI...your named cells/ranges can only be on the first sheet".

Its too bad about the limitation because the Express VI seems like a slick way to output an Excel report from a LabVIEW program with out a lot of coding. Guess I will use the non-Express VIs on the Report Generation pallet to fill in the worksheets.

 

 

0 Kudos
Message 3 of 5
(4,969 Views)
Hi Joch,

Well, I've always been a big fan of workarounds. I love a challenge! So here's one for you that should allow you to continue using the Express VI.

If you can only use named ranges from the first page, why not selectively make whichever page you currently hope to edit the first page! This will mean that you can only insert values into your template Excel file one page at a time, but that's not too bad I suppose.

So I wrote a small subVI that will use ActiveX to programmatically make a sheet of your choice (1,2, 3, etc) the first page, then saves and closes the workbook. Let me know if this helps! 🙂

Message Edited by Jarrod S. on 06-28-2006 11:06 AM

Jarrod S.
National Instruments
0 Kudos
Message 4 of 5
(4,951 Views)
On second thought, I don't think this will work. The problem is that you can't select to only write to a subset of the available template spots using the Express VI. It's all or nothing, so you can't choose only those spots on one particular page. Oh well... Sorry!

Message Edited by Jarrod S. on 06-28-2006 11:17 AM

Jarrod S.
National Instruments
0 Kudos
Message 5 of 5
(4,948 Views)