03-09-2015 06:36 AM
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
03-09-2015 07:10 AM
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
05-06-2015 03:11 PM
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?
05-06-2015 03:27 PM
05-06-2015 03:28 PM
Found something that helped; https://forums.ni.com/t5/LabVIEW/Error-code-quot-2146827284-quot-when-trying-to-open-an-Excel/m-p/20...
So I added this;
05-06-2015 03:31 PM
@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...
So I added this;
You should use the Application Quit method instead of killing the task. I doubt this is the cause of your issue.
Ben64
05-06-2015 03:32 PM
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.
05-06-2015 03:32 PM
I was using application quit but when you compile it dinna work
05-06-2015 07:29 PM
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
05-27-2015 07:23 AM
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...