Is there a way to reference an excel table via an OLEDB connection. For instance if I have a workbook with a single worksheet named Sheet1 and on that worksheet I have created an excel table named MyTable, how do I Select,Insert, etc to MyTable via OLEDB.
Once I make my connection I know I can reference Sheet1 like so:
INSERT INTO [Sheet1$] VALUES (val1, val2, etc ...)
This works, but the data that is added is not included in MyTable, that is the rows are appended after the table but the table itself is not resized to include the new rows.
Is there any way to reference the excel table directly so that new rows auto resize the table?
I thought maybe I can amend the above to :
INSERT INTO MyTable VALUES (etc ...) but the OLEDB connection does not recognize MyTable as a valid name.
Thanks.
Once I make my connection I know I can reference Sheet1 like so:
INSERT INTO [Sheet1$] VALUES (val1, val2, etc ...)
This works, but the data that is added is not included in MyTable, that is the rows are appended after the table but the table itself is not resized to include the new rows.
Is there any way to reference the excel table directly so that new rows auto resize the table?
I thought maybe I can amend the above to :
INSERT INTO MyTable VALUES (etc ...) but the OLEDB connection does not recognize MyTable as a valid name.
Thanks.