Query an excel spreadsheet for data?

  • Thread starter Thread starter texaswebguy2003
  • Start date Start date
T

texaswebguy2003

I know I''ve seen the answer somewhere... :confused:

Is there a way to run a SQL query to get data from an Excel spreadshee
directly?

We've got a sheet with known good formatting, data quality, and need t
get it into an access table at the user's discretion.

Reading cell-by-cell takes forever. I seem to remember something lik
"SELECT (???) FROM 'C:\test.xls'" or something like that?

I'd really prefer an append query to speed things up...

Anyone have any ideas or where the answer may be hidden? Thank
 
Dear Texas Guy:

Simple and quick one-time solution:

Create a table to receive the data, copy and paste it in.

If you need to do this repeatedly, or you need to write to the
spreadsheet as well as read:

Create a linked table to the spreadsheet. When creating a new
table, choose "Link Table". Change "Files of Type:" to Excel.
Navigate to the Excel file. Choose the correct worksheet or named
range.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
You need the IN keyword, something like:

SELECT
Name, City
FROM [Sheet1$A1:D999]
IN 'C:\test.xls' 'EXCEL 8.0;'
 
Cool. Thanks both of you.

OneDay, am I really supposed to use a smiley in my cell reference???
Something makes me feel that MS Office Automation does not support the
smiley... kidding of course...
 
Back
Top