LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Report generation Toolkit: Excel report functions error -2146827284

Hi,

 

I'm trying to create an automated report using excel functions from the report generation toolkit in labVIEW. When I run the program that generates the report first time round (the report consists of several worksheets, each worksheet is added onto the report at a diffferent state in a state machine) it always works fine and no error is generated. However, when I run the program again it will infrequently (sometimes it does, other times it will not) generate the undefined error -2146827284, this is coming from one of the excel report functions and it cannot find it on highlight execution mode.

 

Does anyone know anything about this error, why it occurs, how to prevent it?

 

I would appreciate any help.

 

Thanks,

 

Rowan

0 Kudos
Message 1 of 17
(4,102 Views)

I have been able to do quite a bit with Excel and the Report Generation Toolkit (and have probably hit many of the errors that can be thrown).  Despite this, my ability to guess what your code looks like is sadly lacking.  Have you closely examined the fifth function inside the second loop 3 inches down from the top of the block diagram?

 

Perhaps if we saw the code and were able to test it ourselves, we could explain this error ...

 

Bob Schor

0 Kudos
Message 2 of 17
(4,089 Views)

I'm getting this error on code that was running previously. I have a new computer (Windows 7 and 64 bit machine). Find any resolution to this error for your application?Excel error.JPG

0 Kudos
Message 3 of 17
(3,917 Views)

Do you have the same Excel version as before?

 

Ben64

0 Kudos
Message 4 of 17
(3,912 Views)

@mebels_cti wrote:

Found something that helped; https://forums.ni.com/t5/LabVIEW/Error-code-quot-2146827284-quot-when-trying-to-open-an-Excel/m-p/20...

 

Excel still open

 

So I added this;

force Excel closed.JPG


You should use the Application Quit method instead of killing the task. I doubt this is the cause of your issue.

 

Ben64

0 Kudos
Message 6 of 17
(3,904 Views)

Both machines had Office 2013 but the new one is a subscribed version. Not sure of the difference. Seems to be no error after I closed Excel in the task manager and added a bit of code to close excel even if there's an error.

0 Kudos
Message 7 of 17
(3,902 Views)

I was using application quit but when you compile it dinna work

0 Kudos
Message 8 of 17
(3,899 Views)

What is it that you are trying to do?  I would definitely recommend generating Excel Reports with the Report Generation Toolkit.  For most things, this is a very quick and simple way to read/write Excel data.

 

Bob Schor

0 Kudos
Message 9 of 17
(3,876 Views)

I have the same problem with Report Generation Toolkit also. When I open Excel file, or writing data via Excel Easy Text, I receive the same error. And I've searched many KB articles, and this forum, but I didn't find any proper, comprehensive solution...

0 Kudos
Message 10 of 17
(3,814 Views)