LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -2146827284 (appears randomly)

Hello folks,
 
to my application:
I am appending data at every event(if values chance) in to a 2D string array. And every 10min I am appending this data from the array into Excel(2003) and delete the array.
I was using global variables to remember the cell positions, but I  changed to shift register. Did not help.
 
I checked all the info in the KnowledgeBase...
- dont have any macros
- dont need 65384 rows
- adding a jpg into the second sheet at the end (Stop button) of the test, but this fine I geuess
- ....
 
the problem is, that the error comes up randomly!!! I am running 14hr tests and everything is fine and the other time the error comes up after 25 minutes for example...
 
I attached some screenshots of my code and my log file...
and also my logging into Excel vi is attached...
 
does anyone know more? more KnowledgeBase links...
 
thanks for  help
Ugur
Download All
0 Kudos
Message 1 of 4
(3,047 Views)

Hey Ugur,

Thank you for contacting National Instruments.  I believe I may have found a KnowledgeBase article that may shed some light on what is going on:

Excel Easy Table VI Returns an Error When Input Array Contains Long Strings

In the KB, it says the following: "Whenever writing a 2D array of strings to a spreadsheet, Excel will not accept the array if any of the strings in the array contain more than 911 characters."

Do you know if you ever exceed that character limit?  Perhaps you are randomly exceeding that limit, which also causes the error to appear randomly.

I also found another KnowledgeBase article as well, that may be work looking at: Error -2146827284 Occurs When Using Append Table to Report.vi

Let me know if you think that may be the cause of the problem.

Regards,

Kevin H



Message Edited by Kevin_H on 01-10-2008 12:56 PM
National Instruments
WSN/Wireless DAQ Product Support Engineer
0 Kudos
Message 2 of 4
(3,032 Views)
Hi Kevin,
 
well, the longest string I have is not longer than 20 characters!
I have 15 coulums (fix)
the number of rows increase but I dont reacd 65384!!!
 
BUUUUT, I think I found my problem:
I am logging every 10 min (so the buffer will not be that big) and I am only comparing the minutes and seconds to trigger the logging. (the loop period is less than 1 sec)
and if in this second the loop executes two times it will try to open excel for a second time which is actually open....
now I trying to avoid this....
 
I will let you know if this is my bug....
thank you
Ugur
0 Kudos
Message 3 of 4
(3,027 Views)
Morning Kevin,
 
here is the reason:
if you try to append from an empt buffer (array) into Excel you get this error!!! so you have to make sure that some data is in the array!!!
((probably timing as well, that means in my case: i was trying to open an already opened Excel file))
 
I totally get rid of my timed logging, I am only logging if some data is in the array - for instance if 100 rows are filled I log into Excel.
Question to you: how big can a 2D array get (15 colums and not more than 4000rows)?
I am appending data from the 2D array into Excel and then deleting the array. If I save it frequently I do not lose all the data if something goes wrong. And user is able to check the data while test is still running in the copy file. And putting all the data in one step (Stop button) in to Excel takes longer than appending every 100 rows.
 
Thank you very much for your support
Ugur
 
 
 
0 Kudos
Message 4 of 4
(3,019 Views)