First the basics, this is my configuration:
Microsoft Visual Studio 2008
Version 9.0.30729.4462 QFE
Microsoft .NET Framework
Version 3.5 SP1
Installed Edition: Professional
Microsoft Visual Basic 2008
Microsoft Visual C# 2008
Microsoft Visual C++ 2008
Microsoft Visual Studio 2008 Tools for Office
Microsoft Visual Studio Tools for Applications 2.0
Microsoft Visual Web Developer 2008
Crystal Reports
Crystal Reports Basic for Visual Studio 2008
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB2538241) KB2538241
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB944899) KB944899
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947171) KB947171
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947180) KB947180
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB948127) KB948127
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB953256) KB953256
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB971092) KB971092
Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB945282) KB945282
Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946040) KB946040
Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946308) KB946308
Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946344) KB946344
Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946581) KB946581
Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB947173) KB947173
Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB947540) KB947540
Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB947789) KB947789
Microsoft Visual Studio 2008 Professional Edition - ENU Service Pack 1 (KB945140) KB945140
Microsoft Visual Studio 2008 Professional Edition - ENU Service Pack 1 (KB947888) KB947888
Security Update for Microsoft Visual Studio 2008 Professional Edition - ENU (KB973675) KB973675
Security Update for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB2251487) KB2251487
Security Update for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB2669970) KB2669970
Security Update for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB972222) KB972222
SQL Server Analysis Services
Microsoft SQL Server Analysis Services Designer
Version 10.50.2500.0
SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 10.50.2500.0
SQL Server Reporting Services
Microsoft SQL Server Reporting Services Designers
Version 10.50.2500.0
Update for Microsoft Visual Studio 2008 Professional Edition - ENU (KB956453) KB956453
Update for Microsoft Visual Studio 2008 Professional Edition - ENU (KB967143) KB967143
BIDSHelper
BIDS Helper 2008 - An Addin to extend BI Development Studio
(c) 2009 Version 1.4.3.0
http://www.codeplex.com/bidshelper
Microsoft Office Professional Plus 2013 15.0.4569.1506
Microsoft Office Professional Plus 2010 14.0.7015.1000
The versions of Excel:
2013 - 15.0.4753.1000 (32-bit)
2010 - 14.0.7145.5000 (32-bit)
I'm running Office 2013 & Office 2010 on my machine.
The problem I am having is as follows:
I have to open an xlsx file in a script task to reformat the data prior to feeding into a data flow. I've done this before without issue. I use the following code in my script task to open the file, create a connection, open and fill the dataset.
connectionString = "Data Source=" + Dts.Variables("stFlatFileConnString").Value.ToString + ";Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties=" + Chr(34) + "Excel 12.0 Xml;HDR=NO;IMEX=1" + Chr(34) + ";" excelConnection = New OleDbConnection(connectionString) 'MsgBox("2a") Dim SurveyRawDataQuerycmdExcel As New Data.OleDb.OleDbDataAdapter(SurveyRawDataQuery, excelConnection) Dim theData As DataSet = New DataSet 'MsgBox("2b") SurveyRawDataQuerycmdExcel.Fill(theData, "TheData")
If I DO NOT uncomment the message boxes, the fill fails with "External table is not in the expected format" error. However, if IDO uncomment the message boxes, it runs just fine. I can't/don't want to keep the message boxes. What is causing this and what can I do to get this to work?