0

I have an Excel file containing a power query, and an Access file with a maketable query, I would like to use the maketable query in Access to import from the Excel file (not a linked table)

How should I do this using SQL.

I have tried using a linked table in the past, and it caused too may problems.

select[table].[column] into maketable
from 'file path\file.xlsm'
select[table].[column] into maketable
from [\\server\directory\file.xlsm].[table] AS [TEMP TABLE]

The reason I do not give a specific file location is because it is on a local server.

It says that 'FilePath\File.xlsm' is not a valid name. I expect it to show me the column from the identified table

p.s. I apologize in advance if my wording is not very good, as I am not very good with words.

cdickstein
  • 55
  • 5
  • Your `maketable` cannot be a query. It is a table that will be (re)created. – Gustav Sep 26 '19 at 18:25
  • Your SELECT INTO creates a table named 'maketable'. Review http://www.accessmvp.com/KDSnell/EXCEL_MainPage.htm. Need a valid file path in place of `file path\file.xlsm`. – June7 Sep 26 '19 at 21:30
  • This post explains how to do an Access maketable that targets ODBC external database with SQL properties. You can find your Power Query connection string by opening Excel and going to Connections > Query > Properties > Definition https://stackoverflow.com/questions/21716199/using-access-to-do-a-make-table-query-to-create-a-sql-server-table-using-odbc-co – Jenn Sep 27 '19 at 11:17

0 Answers0