March 30, 2015 at 5:16 am
I have now moved it out of the root drive but I am still getting the same error
March 30, 2015 at 5:20 am
See the edits of my earlier post!
GilaMonster (3/30/2015)
If that's an excel spreadsheet, you don't need and shouldn't be using a format file, you should be specifying the driver that you installed earlier and importing it as an excel spreadsheet. Format file is for a text file. Excel spreadsheets aren't text.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 30, 2015 at 5:27 am
Sorry I didn't see that. Will will try it and let you know what happens.
March 30, 2015 at 5:49 am
Hi Gila,
It works with the following code:
SELECT * FROM OPENDATASOURCE( 'Microsoft.ACE.OLEDB.12.0', 'Data Source="D:\DatabaseAdmin\EuroSales.xlsx";
Extended properties=Excel 8.0')...EUROSALES$
Just one question, how do I now select only the columns that I want, because sometimes there are random columns at the back with no data, when they don't delete the whole column in excel, but only the data in the column.
March 30, 2015 at 5:51 am
Don't use SELECT *.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 30, 2015 at 5:55 am
:blush: sorry that was a crazy stupid question..I am so stressed about this thing I am making stupid mistakes now..let me just take a quick break
March 30, 2015 at 6:14 am
Now it says my last to column names are invalid, but I copied it from the spreadsheet into my select statement, so how can they be invalid?
March 30, 2015 at 6:18 am
Spaces or other unprintable characters.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 30, 2015 at 6:20 am
I just saw when I selected *, it made the column names vat# instead of vat., so that was the problem. Thanks for everyone's patience, time and help in this matter, I really appreciate it guys.:-)
Viewing 9 posts - 16 through 23 (of 23 total)
You must be logged in to reply to this topic. Login to reply