From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -41110 with MS Office Report vi

I'm trying to use the MS Office Report express vi, and when I use an excel template with named ranges on more than one sheet I get the error "Error -41110 occurred at ex_RGT_Append Anything to Report.vi"..."Possible reasons: You specified invalid Word bookmarks or Excel named ranges."  I know that the names I used are acceptible by excel, (data, high_limits, low_limits) and they work fine when on the same sheet, but I want them to be sent to separate sheets.  How do I get around this error or is it a limitation with this vi?
0 Kudos
Message 1 of 8
(7,480 Views)
Hi, ejosephw:

The problem can be that word or excel can't find the bookmark you are looking for.

Are you sure the template you open has the bookmark you're trying to use?

You can place error probes that halt on error to see the name that fails.

Good luck,
Aitortxo.
0 Kudos
Message 2 of 8
(7,474 Views)

Hello,

Yes, this is a limitation of the MS Office Report Express VI...your named cells/ranges can only be on the first sheet.  I will look into fixing this problem in a future version of the Report Generation Toolkit.

-D

0 Kudos
Message 3 of 8
(7,465 Views)

Hi,

 

I am using Labview 2009 SP1 and the same problem still exists. I can create a link using MS Office Report to a cell in the first worksheet, however, it will not allow a link to worksheet 2. Was this ever resolved?

 

Report Generation Toolkit: You specified invalid Word bookmarks or Excel named ranges.

 

Thanks,

Ryan

 

0 Kudos
Message 4 of 8
(6,327 Views)

I can witness this issue still exists more than 6 years after the first post! *sigh*

 

From my experience, the problem doesn't occur when the named range is not on the first sheet, but when it is not on the "active" sheet, that is, the one that shows first when opening the spreadsheet.

 

This can be easily tested: open your template, select another sheet, save and close.

Now re-execute labview code with report generation and named ranges from the first sheet that worked before don't work anymore...

 

(Win7x64eng, Office2007Pro+, LabView2011 SP1)

0 Kudos
Message 5 of 8
(6,200 Views)

I found a workaround:

I modified Excel_Get_Range vi in the framework libraries and added a loop to iterate through the other worksheets of the workbook until I find the named range.

 

Well, I guess that hacking in framework VI's is not a solution that NI would recommend (and for good reasons).

I nonetheless posted the modified VI in case someone would be curious about it. Smiley Wink

 

Message 6 of 8
(6,191 Views)

This issue is still not fixed in LV2015

But a big thanks to GNO for the patch!

0 Kudos
Message 7 of 8
(5,054 Views)

@GNO wrote:

I found a workaround:

I modified Excel_Get_Range vi in the framework libraries and added a loop to iterate through the other worksheets of the workbook until I find the named range.

 

Well, I guess that hacking in framework VI's is not a solution that NI would recommend (and for good reasons).

I nonetheless posted the modified VI in case someone would be curious about it. Smiley Wink

 


The problem is still not fixed in 2018, but thankfully this does the trick!  Use GNO Member's modified VI by replacing the original "Excel_Get_Range" VI.  It should be located in C:\Program Files (x86)\National Instruments\LabVIEW 2017\vi.lib\addons\_office\_exclsub.llb

I made sure to copy the original "Excel_Get_Range" VI into another location in case things went south and I recommend you do the same just to be safe.  However, this worked like a charm!

0 Kudos
Message 8 of 8
(4,153 Views)