Page 1 of 1

Using Excel as ODBC - can't write sql

Posted: Thu Jul 21, 2011 5:56 pm
by EP_explorer
I want to use Excel file as source for downloading into TM1 data and dimensions.

So I create Excel file - with name Departments.xlsx. Create sheet Department in it. Then fill column A as
1 Departments
2 Department1
3 Department2
4 Department3

Then I create ODBC source Departments which look on file Departments.xlsx

Then I create TI process. DataSource Type is ODBC. In Data Source name chose ODBC source departments and tried to write SQL statement

I tried
select [Departments] from [Departments];
select [A] from [Departments];
select * from [Departments];

The result is one:
SQL statement failed

Can somebody say that I should write in query?

Re: Using Excel as ODBC - can't write sql

Posted: Mon Jul 25, 2011 9:33 am
by TomBr
You need to specify the sheet, as you have already specified the workbook in the ODBC setup.

You also need to add an $ at the end so try:

Select * from [Department$];

I have never used this on a live system - usually trying to get away from Excel datasources.

Tom

Re: Using Excel as ODBC - can't write sql

Posted: Mon Jul 25, 2011 5:24 pm
by EP_explorer
Thank you a lot

Select * from [Department$]; helped