I have a stored procedure that manipulates some data in an excel spreadsheet. I am importing data by creating a QueryTable object. I would like to set TextFileColumnDataTypes property for the object but I can't figure out how to pass in an array to the sp_OASetProperty routine.
This is what my code looks like but obviously it doesn't work:
EXECUTE @rc = master..sp_OASetProperty @xlQueryTable, 'TextFileColumnDataTypes', 'Array(xlTextFormat, xlTextFormat, xlGeneralFormat)'
Is there any way to do this?