Code:
SELECT *
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\file.xls',
'SELECT * FROM [sheetname$]')
This code doesn't work when I run it, but if I transfer my file to a network folder, then it does.
When I run this code from my home machine which has sql server installed locally, it works fine.
I'm guessing the sql server on my company's network doesn't look at my work pc's c drive, how do I fix this?
Basically I'm trying to find a fast way to read an excel file, if I do this from C# using oledb it works but it doesn't pull through all values because the excel file is made by copying and pasting from multiple sources.
Last edited: