LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -2146777998 at creating excel file

Solved!
Go to solution

Hello Together,

 

for a test device I'm creating an excel file.

sometimes I get the following Error:

WWolf78_0-1643617679623.png

from debugging I know, this happens here:

WWolf78_1-1643617719775.png

Working solution is to end the Excel Task via the Taskmanager:

WWolf78_2-1643617823074.png

 

is there a way to do this within the program as I'd like to reduce User interaction..

Thanks

0 Kudos
Message 1 of 6
(1,583 Views)

Hello,

 

By using the Report Generation Toolkit it works well even if Excel is already open and in use.

An other way is to kill the task with System Exec, as you are doing manually currently.

0 Kudos
Message 2 of 6
(1,560 Views)

Hi defaphe,

 

thanks for the Tip.

 

I tried the following, but it doesn't work.

Error occurs at the "workbooks""add"

the termination is ok, but again at the "add workbook" the error happens again and the excel Task is still running

so obviously the termination of the excel task does not work

any ideas why:?

 

WWolf78_0-1643791910807.png

 

0 Kudos
Message 3 of 6
(1,533 Views)

even the full path name does not work:

WWolf78_0-1643795694510.png

 

0 Kudos
Message 4 of 6
(1,526 Views)
Solution
Accepted by WWolf78

You are missing some "". See the snippet below.

Excel.png

Message 5 of 6
(1,517 Views)

damn, always those tiny details which blocks those functions...

 

with the "" it works!

 

Thanks!

0 Kudos
Message 6 of 6
(1,505 Views)