Glory
Well-known Member
- Joined
- Mar 16, 2011
- Messages
- 640
Code:
SELECT *
FROM `C:\Documents and Settings\gendetlab\Desktop\hwvdata`.`'Sheet1$'` `'Sheet1$'`
UNION ALL
SELECT *
FROM `C:\Documents and Settings\gendetlab\Desktop\hwvdata2`.`'Sheet1$'` `'Sheet1$'`
This code works perfectly, except that I have to make column headers bold before they MSQuery will recognize the tables as 'valid'.
If I have to open the files to make the column headers bold, the entire purpose of the code (to speed up the copying process) will be defeated.
Can you help explain why this is happening? Is there a way to force MSQuery to recognize the used range of a sheet as a table, no matter what its contents look like?
To just, treat the first row as a series of column headers?