PowerPivot Excel datasource with period in Column Name

The other day we were doing some work with PowerPivot, we needed to union multiple excel files, without manual intervention or an SSIS integration, to create a single data source. After finding the following post; http://www.contextures.com/PowerPivot-Identical-Excel-Files.html, that task became pretty easy.

One really interesting thing that I learned after trying to select excel columns where a period was present, ie. ‘column.name’, is that you need to replace the ‘.’ with a ‘#’ for the query to work. The following statement

Select [Sheet1$].[Column.Name] from test.xlsx.[Sheet1$] would be replaced with Select [Sheet1$].[Column#Name] from test.xlsx.[Sheet1$]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s