11-14-2011 04:27 AM
Dear all,
First of all thanks for your help !
I'm experiencing a strange error with excel activeX: "-2146827284" !
Why strange? Because my export function works perfectly on a computer but not on another ... (both are windows 7 + Excel 2007)
How my application works :
I must read an excel spreadsheet that stores measurements done with different types of instruments.
For each instrument type I must create a specific spreadsheet with its measurements.
As an example :
1 excel spreadsheet with many measurements from 4 different type of instruments
SHOULD GIVE
4 excel spreadsheets containing the measurements of each instrument (1 spreadsheet for one instrument type).
Hope I'm clear ...
Why I'm doing it with LV ? Because it is fun !
Now here are some snapshoot.
1-where the bug appears :
2- The message I get (translated from french to english):
Additionnal information :
- The string size I write in excel cells is 6 characters max. Plus I set a condition to return an error if the string length is >900 characters.
Many thanks for your help !
Solved! Go to Solution.
11-15-2011 09:19 AM
The error you are showing doesn't seem to imply anything about string length. What led you to believe it has something to do with the string length. The error appears to be caused by the fact that you either have the wrong path (perhaps you're writing to a network drive), or the file is already open in Excel.
11-15-2011 10:13 AM
Hi,
In a first time what led me to think it was a string length problem was an old thread I found by searching for -2146827284 error code.
I thought that there should some phantom characters added due to an improper conversion. So I set a test to check the string lenght. Now that I'm sure it is not the string length I have no more clue.
Plus what does really upset me it is that the same application work fine on a computer but not on another.
Thanks
11-17-2011 11:08 AM
SOOOOOO simple ...
It was just the folder name...
I coded the folder name as a constant for dev purpose. And I didn't pay attention that the folder name was not the same on both computers !!!
"one letter missing = one week losed"
Arrrgh
sorry all of you for bothering
11-17-2011 11:18 AM
This is why you should avoid "magic strings" like absolute paths inside of code.
04-22-2013 07:59 PM
I had a slightly differnet problem that caused the same error. My .xlsx file was corrupt so it would appear that this error is related to Excel not being able to open the file.