[R] odbcConnectExcel2007 connection error

Liam Blanckenberg liam.blanckenberg at gmail.com
Wed Feb 3 06:46:26 CET 2010


Hi all,

Apologies if I violate any posting etiquette - this is my first
submission to the R mailing list. I regularly use
'odbcConnectExcel2007' (from package 'RODBC') to read data from named
ranges in excel workbooks into R. I recently received the following
error message when attempting to set up a connection channel (i.e. ch1
<- odbcConnectExcel2007('path to excel 2007 file.xlsx')):

"External table is not in the expected format".

The workbook I was attempting to connect to had 15+ sheets, pivot
tables, internal and external cell references, etc - all of which in
the past had posed no problems. Through a process of trial and error
it appears that odbcConnectExcel2007 had issues with several charts in
the workbook that were sheets (i.e. the form of chart that can be
generated by right clicking a chart and selecting "move chart" >"new
sheet" in excel 2007). Deleting these 'sheet charts' allowed the
connection to proceed as normal.

Has anyone experienced this issue before, and if so is there a known
way around it? I have done some google/R help list searching and
turned up nothing...

Details of OS/R:
- Windows 7 (64 bit)
- R version 2.9.2
- RODBC version 1.3-1
- Excel 2007.

Many thanks,

Liam



More information about the R-help mailing list