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 -2146827284 and Excel 2016 file extensions

Solved!
Go to solution

About 3 days of Troubleshooting:

 

My LT26 EXE application created with LabVIEW 2013 started to generate a "can't find file error".

I found that it was most probably caused by an EXCEL upgrade to 2016 from 2013 which changed the excel template extension from .xlt to .xltx. I could duplicate this error by changing the file extension my app was looking for.

 

After upgrading to Windows 10 and monitoring Source Code operation, my LT26 application kept generating unknown error -2146827284 while executing LT26 Microsoft Office Toolkit Functions; specifically the subVIs containing the Excel Easy Text.vi function.

 

In my source code, I had noticed that I had noted when the code was first developed several years ago that I placed a note indicating: "Make sure a printer has been configured even though this computer may not ever be connected to a printer. The program requires a printer to be configured in order to generate the Excel report files." After configuring a printer, the application than ran normally. After removing the printer, the application still continued to function normally. Definitely not sure what was going on here and couldn’t duplicate.

 

I was now satisfied that everything was working at this point, however, the next day my application was generating the same -2146827284 unknown error again. I made a copy of the subVI containing all the Excel Final report functions and stored it to a SD card under the same name with a suffix -X. I then recreated the subVI containing the Excel Easy Text.vi functions in the original subVI containing the Excel Easy Text.VIs.  After recreating the subVI with functions from the LabVIEW 2016 palette everything now functioned normally with no errors. I could recreate the error by substituting the original subVI named with the -X suffix.

As I remember it, merely substituting the Excel Easy Text.Vis didn't resolve the issue.

 

Another issue arose with another application utilizing the Excel Easy Text.Vis. However merely replacing the Excel Easy Text.vis with identical functions from the 2016 LabVIEW pallette did not fix the issue. The interesting thing is that the application involved opening an Excel template which the Excel Easy Text Vis than performed their function on. If the Excel template was left open from the previous execution, the application would function normally, however, if the Excel template was closed upon application was executed the application would generate the "-2146827284 unknown error". In this instance recompiling the Microsoft Office Toolkit Directory: LabVIEW 2016>vi.lib>addons>_office remedied the issue.

0 Kudos
Message 1 of 3
(3,361 Views)

Hi sfrosty,

 

Just to check, is there a question here, or is this just a general FYI about fixing the issue?

William R.
0 Kudos
Message 2 of 3
(3,300 Views)
Solution
Accepted by topic author sfrosty

The post was my experience in resolving the issue! Smiley Wink

0 Kudos
Message 3 of 3
(3,269 Views)