During the import of CSV-files to Excel our program does basically something like this:
import = sheet'queryTables'add(*connection, *range)
import'adjustColumnWidth = 1
import'textFileCommaDelimiter = 0
import'textFileDecimalSeparator$ = ","
import'textFileThousandsSeparator$ = "."
def object datatypes, %wdx$ + "*VARARRAY"
datatypes'setData(0, 2)
datatypes'setData(1, 2)
datatypes'setData(2, 1)
datatypes'setData(3, 4)
import'textFileColumnDataTypes.put(*datatypes)
This runs fine everywhere, but...
At one site the last statement throws an error 40. If I type "run" the program continues without errors.
Is this an issue of our program or an issue of Excel? Where does this error 40 come from, and why is it gone upon continuation?