Microsoft odbc excel driver external table is not in the expected format

I’m trying to read an Excel (xlsx) file using the code shown below. I get an «External table is not in the expected format.» error unless I have the file already open in Excel. In other words, I have to open the file in Excel first before I can read if from my C# program. The xlsx file is on a share on our network. How can I read the file without having to open it first?
Thanks

string sql = "SELECT * FROM [Sheet1$]";
string excelConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pathname + ";Extended Properties="Excel 8.0;HDR=YES;IMEX=1;"";

using (OleDbDataAdapter adaptor = new OleDbDataAdapter(sql, excelConnection)) {
    DataSet ds = new DataSet();
    adaptor.Fill(ds);
}

pnuts's user avatar

pnuts

58k11 gold badges85 silver badges137 bronze badges

asked Jul 16, 2009 at 18:23

Sisiutl's user avatar

1

«External table is not in the expected format.» typically occurs when trying to use an Excel 2007 file with a connection string that uses: Microsoft.Jet.OLEDB.4.0 and Extended Properties=Excel 8.0

Using the following connection string seems to fix most problems.

public static string path = @"C:srcRedirectApplicationRedirectApplication301s.xlsx";
public static string connStr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=Excel 12.0;";

answered Sep 1, 2009 at 16:38

FAtBalloon's user avatar

FAtBalloonFAtBalloon

4,4701 gold badge24 silver badges33 bronze badges

12

Thanks for this code :) I really appreciate it. Works for me.

public static string connStr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=Excel 12.0;";

So if you have diff version of Excel file, get the file name, if its extension is .xlsx, use this:

Private Const connstring As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=Excel 12.0;";

and if it is .xls, use:

Private Const connstring As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" + path + ";Extended Properties=""Excel 8.0;HDR=YES;"""

Arseni Mourzenko's user avatar

answered Feb 11, 2010 at 6:38

Trex's user avatar

TrexTrex

2893 silver badges2 bronze badges

2

(I have too low reputation to comment, but this is comment on JoshCaba’s entry, using the Ace-engine instead of Jet for Excel 2007)

If you don’t have Ace installed/registered on your machine, you can get it at: https://www.microsoft.com/en-US/download/details.aspx?id=13255

It applies for Excel 2010 as well.

Eunoseer's user avatar

Eunoseer

753 silver badges10 bronze badges

answered Feb 25, 2011 at 14:10

cederlof's user avatar

cederlofcederlof

7,1044 gold badges44 silver badges62 bronze badges

3

Just add my case. My xls file was created by a data export function from a website, the file extention is xls, it can be normally opened by MS Excel 2003. But both Microsoft.Jet.OLEDB.4.0 and Microsoft.ACE.OLEDB.12.0 got an «External table is not in the expected format» exception.

Finally, the problem is, just as the exception said, «it’s not in the expected format». Though it’s extention name is xls, but when I open it with a text editor, it is actually a well-formed html file, all data are in a <table>, each <tr> is a row and each <td> is a cell. Then I think I can parse it in a html way.

answered Jan 22, 2016 at 12:25

Fengtao Ding's user avatar

4

I had the same problem. which as resolved using these steps:

1.) Click File

2.) Select «save as»

3.) Click on drop down (Save as type)

enter image description here

4.) Select Excel 97-2003 Workbook

enter image description here

5.) Click on Save button

enter image description here

answered Mar 13, 2019 at 6:49

Kamran's user avatar

KamranKamran

6596 silver badges8 bronze badges

1

I had this same issue(Using the ACE.OLEDB) and what resolved it for me was this link:

http://support.microsoft.com/kb/2459087

The gist of it is that installing multiple office versions and various office sdk’s, assemblies, etc. had led to the ACEOleDB.dll reference in the registry pointing to the OFFICE12 folder instead of OFFICE14 in

C:Program FilesCommon FilesMicrosoft SharedOFFICE14ACEOLEDB.DLL

From the link:

Alternatively, you can modify the registry key changing the dll path to match that of your Access version.

Access 2007 should use OFFICE12, Access 2010 — OFFICE14 and Access
2013 — OFFICE15

(OS: 64bit Office: 64bit) or (OS: 32bit Office: 32bit)

Key: HKCRCLSID{3BE786A0-0366-4F5C-9434-25CF162E475E}InprocServer32

Value Name: (Default)

Value Data: C:Program FilesCommon FilesMicrosoft
SharedOFFICE14ACEOLEDB.DLL

(OS: 64bit Office: 32bit)

Key:
HKCRWow6432NodeCLSID{3BE786A0-0366-4F5C-9434-25CF162E475E}InprocServer32

Value Name: (Default)

Value Data: C:Program Files (x86)Common FilesMicrosoft
SharedOFFICE14ACEOLEDB.DLL

Community's user avatar

answered Jun 5, 2013 at 12:46

jordanhill123's user avatar

jordanhill123jordanhill123

4,1222 gold badges30 silver badges40 bronze badges

1

I have also seen this error when trying to use complex INDIRECT() formulas on the sheet that is being imported. I noticed this because this was the only difference between two workbooks where one was importing and the other wasn’t. Both were 2007+ .XLSX files, and the 12.0 engine was installed.

I confirmed this was the issue by:

  • Making a copy of the file (still had the issue, so it wasn’t some save-as difference)
  • Selecting all cells in the sheet with the Indirect formulas
  • Pasting as Values only

and the error disappeared.

answered May 11, 2012 at 19:33

John M. Black's user avatar

I was getting errors with third party and Oledb reading of a XLSX workbook.
The issue appears to be a hidden worksheet that causes a error. Unhiding the worksheet enabled the workbook to import.

answered Jul 4, 2014 at 18:06

John M's user avatar

John MJohn M

14.2k29 gold badges90 silver badges139 bronze badges

If the file is read-only, just remove it and it should work again.

answered Feb 4, 2019 at 22:25

Tehscript's user avatar

TehscriptTehscript

2,5762 gold badges12 silver badges22 bronze badges

I know this is a very old post, but I can give my contribution too, on how I managed to resolve this issue.

I also use «Microsoft.ACE.OLEDB.12.0» as a Provider.
When my code tried to read the XLSX file, it received the error «External table is not in the expected format.»
However, when I kept the file open in Excel and then the code tried to read it … it worked.

SOLUTION:
I use Office 365 with company documents and in my case, the solution was very simple, I just needed to disable the sensitivity of the document, setting it to «public».
Detail: Even after saving as «public» the green check still remained marked in «Internal Use», but the problem remained solved after that.

enter image description here

answered Nov 18, 2020 at 14:14

MMJ's user avatar

MMJMMJ

5254 silver badges6 bronze badges

I had this problem and changing Extended Properties to HTML Import fixed it as per this post by Marcus Miris:

strCon = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & importedFilePathAndName _
         & ";Extended Properties=""HTML Import;HDR=No;IMEX=1"";"

answered Jun 24, 2016 at 13:07

majjam's user avatar

majjammajjam

1,2762 gold badges15 silver badges32 bronze badges

1

ACE has Superceded JET

Ace Supports all Previous versions of Office

This Code works well!

        OleDbConnection MyConnection;
        DataSet DtSet;
        OleDbDataAdapter MyCommand;
        
        MyConnection = new System.Data.OleDb.OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=..\Book.xlsx;Extended Properties=Excel 12.0;");
        MyCommand = new System.Data.OleDb.OleDbDataAdapter("select * from [Sheet1$]", MyConnection);
        DtSet = new System.Data.DataSet();
        
        MyCommand.Fill(DtSet);
        dataGridView1.DataSource = DtSet.Tables[0];
        MyConnection.Close();

Community's user avatar

answered Oct 3, 2016 at 11:14

Akshay Upadhyay's user avatar

3

Ran into the same issue and found this thread. None of the suggestions above helped except for @Smith’s comment to the accepted answer on Apr 17 ’13.

The background of my issue is close enough to @zhiyazw’s — basically trying to set an exported Excel file (SSRS in my case) as the data source in the dtsx package. All I did, after some tinkering around, was renaming the worksheet. It doesn’t have to be lowercase as @Smith has suggested.

I suppose ACE OLEDB expects the Excel file to follow a certain XML structure but somehow Reporting Services is not aware of that.

answered Jun 27, 2018 at 8:02

kerwei's user avatar

kerweikerwei

1,8021 gold badge13 silver badges22 bronze badges

1

the file might be locked by another process, you need to copy it then load it as it says in this post

answered Feb 16, 2014 at 23:58

user3140982's user avatar

user3140982user3140982

1351 gold badge3 silver badges8 bronze badges

Just adding my solution to this issue. I was uploading a .xlsx file to the webserver, then reading from it and bulk inserting to SQL Server. Was getting this same error message, tried all the suggested answers but none worked. Eventually I saved the file as excel 97-2003 (.xls) which worked… only issue I have now is that the original file had 110,000+ rows.

answered Jun 17, 2015 at 9:47

Kieran Quinn's user avatar

Kieran QuinnKieran Quinn

1,0651 gold badge22 silver badges49 bronze badges

If you still have this problem, then check your permissions, I tried many of these suggestions and my concrete problem was that the file that I wanted to process was under source control and the thread had no permissions, I had to change the entire folder permissions and it started to work (I was processing many files in there)… It also matches many suggestions like change the name of the file or check that the file is not loicked by another process.

I hope it helps you.

answered Feb 16, 2016 at 6:32

Juan's user avatar

JuanJuan

2,13617 silver badges26 bronze badges

Paulo Henrique Queiroz's user avatar

answered Jul 16, 2009 at 18:33

Nelson's user avatar

NelsonNelson

4644 silver badges10 bronze badges

3

This can occur when the workbook is password-protected. There are some workarounds to remove this protection but most of the examples you’ll find online are outdated. Either way, the simple solution is to unprotect the workbook manually, otherwise use something like OpenXML to remove the protection programmatically.

answered Feb 2, 2017 at 15:25

KthProg's user avatar

KthProgKthProg

2,0201 gold badge23 silver badges32 bronze badges

I recently saw this error in a context that didn’t match any of the previously listed answers. It turned out to be a conflict with AutoVer. Workaround: temporarily disable AutoVer.

answered Apr 26, 2017 at 17:46

unbob's user avatar

unbobunbob

3313 silver badges7 bronze badges

That excel file address may have an incorrect extension. You can change the extension from xls to xlsx or vice versa and try again.

answered Jun 27, 2018 at 8:25

MiMFa's user avatar

MiMFaMiMFa

9049 silver badges14 bronze badges

I recently had this «System.Data.OleDb.OleDbException (0x80004005): External table is not in the expected format.» error occur. I was relying on Microsoft Access 2010 Runtime. Prior to the update that was automatically installed on my server on December 12th 2018 my C# code ran fine using Microsoft.ACE.OLEDB.12.0 provider. After the update from December 12th 2018 was installed I started to get the “External table is not in the expected format» in my log file.

I ditched the Microsoft Access 2010 Runtime and installed the Microsoft Access 2013 Runtime and my C# code started to work again with no «System.Data.OleDb.OleDbException (0x80004005): External table is not in the expected format.» errors.

2013 version that fixed this error for me
https://www.microsoft.com/en-us/download/confirmation.aspx?id=39358

2010 version that worked for me prior to the update that was automatically installed on my server on December 12th.
https://www.microsoft.com/en-us/download/confirmation.aspx?id=10910
https://www.microsoft.com/en-us/download/confirmation.aspx?id=10910

I also had this error occur last month in an automated process. The C# code ran fine when I ran it debugging. I found that the service account running the code also needed permissions to the C:WindowsTemp folder.

answered Dec 20, 2018 at 20:12

vvvv4d's user avatar

vvvv4dvvvv4d

3,8511 gold badge13 silver badges18 bronze badges

Working with some older code and came across this same generic exception. Very hard to track down the issue, so I thought I’d add here in case it helps someone else.

In my case, there was code elsewhere in the project that was opening a StreamReader on the Excel file before the OleDbConnection tried to Open the file (this was done in a base class).

So basically I just needed to call Close() on the StreamReader object first, then I could open the OleDb Connection successfully. It had nothing to do with the Excel file itself, or with the OleDbConnection string (which is naturally where I was looking at first).

answered Aug 2, 2019 at 19:04

tbone's user avatar

tbonetbone

15k3 gold badges33 silver badges40 bronze badges

I’ve had this occur on a IIS website that I host, rarely but periodically this error will popup for files that I’ve previously parsed just fine. Simply restarting the applicable app pool seems to resolve the issue. Not quite sure why though…

answered Feb 4, 2022 at 19:49

David Rogers's user avatar

David RogersDavid Rogers

2,5214 gold badges41 silver badges82 bronze badges

This happened to us just recently. A customer of ours was getting this error when trying to upload their excel file on our website. I could open the xlsx file fine on ms excel and don’t see any irregularities with the file. I’ve tried all mentioned solutions in here and none worked. And i found this link Treating data as text using Microsoft.ACE.OLEDB.12.0. What worked for our case is adding IMEX=1 attribute to the connection string. So if you are using Microsoft ACE OLEDB 12.0 this might help fix your issue. Hope this helps.

<add name="ExcelTextConnection" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0;HDR={1};IMEX=1'" />

answered Apr 14, 2022 at 17:47

sd4ksb's user avatar

sd4ksbsd4ksb

2311 gold badge4 silver badges15 bronze badges

Frequently encountering the same external table is not in the expected format error each time you try connecting to Excel or while importing an Excel source?

Don’t have any idea why you are getting this external table is not in the expected format error or how to fix this?

No need to get worried as our today’s blog topic is specifically about Excel external table format error.

User’s Query:

For understanding this specific error more clearly you can read out this user query.

I am using Excel as a database. While connecting to the database I’m getting the error “External table is not in the expected format”.

Same connection string is working fine in the code before. The only difference is there in the data source. I’m getting the error when the source file is password protected.

Below is my connection string-

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=$AAApplicationPath$Automation AnywhereMy TasksFinanceFixed Asset – Tracking Process1Inputexport.XLSX;Extended Properties=”Excel 12.0 Xml;HDR=YES”;

I wanted to know if there is any way to connect to Excel with a password in the connection string.

To retrive data from corrupt Excel file, we recommend this tool:

This software will prevent Excel workbook data such as BI data, financial reports & other analytical information from corruption and data loss. With this software you can rebuild corrupt Excel files and restore every single visual representation & dataset to its original, intact state in 3 easy steps:

  1. Download Excel File Repair Tool rated Excellent by Softpedia, Softonic & CNET.
  2. Select the corrupt Excel file (XLS, XLSX) & click Repair to initiate the repair process.
  3. Preview the repaired files and click Save File to save the files at desired location.

An external table is not in the expected format error in Excel is one such error that usually occurs when connecting to the MS Excel data source.

An error occurred while communicating with the data source.
Unable to connect to the server. Check that the server is running and that you have access privileges to the requested database.
Database error 0x80004005: External table is not in the expected format. 

Under What Circumstances Excel External Table Is Not In The Expected Format Error Occur?

Mostly this Excel external table is not in the expected format error encounters meanwhile importing the Excel source or to some target definition. At that time you will get the following error.

“[Microsoft][ODBC Excel Driver] External table is not in the expected format” 

​This issue also originates when you are using the wrong ODBC driver for importing Excel files that get saved with the .xlsx extension.

Why Do I Get Error ‘External Table Is Not In The Expected Format’ ?

 Following are the possible causes behind the occurrence of this ‘external table is not in the expected format’ Excel error

  • Maybe you are not using a valid Excel workbook.
  • Your Excel file is somehow got corrupted.
  • The Excel version is not well supported. Supported versions are: Excel 3.0-2013.
  • Your Excel file is encrypted with a password and the database doesn’t support password-protected files.

Helpful Article: Top 3 Methods To Unlock Password Protected Excel File

How To Resolve Excel File Import Error ‘External Table Is Not In The Expected Format’?

Method 1# Install Microsoft.ACE.OLEDB.12.0 Drivers.

If your Excel file which you need to import has the ‘.xlsx’ extension. Then Excel drivers are required for Excel version 2007 and onwards.

Suppose you need to import Excel file having extension .xlsx then you need to use the Microsoft Excel Driver (*.xls).

So it’s recommended to install new Microsoft.ACE.OLEDB.12.0 drivers.

Method 2# Check The ODBC Definition

To fix this Excel External table is not in the expected format error, check for the ODBC definition within the ODBC Manager. This is to verify whether the right driver is been used or not as per the file extension:

Method 3# Enable The Data Connection

Sometimes this problem of the external table is not in expected format error also occurs due to the disabled data connection option.

For enabling this data connection on a temporary basis, simply tap the “Enable Editing” or” Options” button.

external data connection has been disabled

If you wish to open only the safe Excel data files and needs to automatically enable the content. Then follow the below-mentioned steps:

  • Activate MS Excel, tap the File option from the menu.
  • Hit the Options>Trust Center>Trust Center Settings.

trust-center-in-excel-options-dialog

  • On the other hand, choose the External Content After that tap on the “Enable all Data Connections (not recommended)” option.

Enable The Data Connection

  • Hit the OK After that take the exit from the application and reopen your Excel spreadsheet.
  • You won’t see the “Data Connections have been disabled” message on your screen after making these steps.

Method 4# Use The External Data Range

The external data range is a defined table name or any name which describes the data location from where the data is brought into the worksheet.

When any connection is made with the external data, the Excel application automatically generates an external data range.

The only exception to this is the PivotTable report which gets connected to the data source.

As the PivotTable report doesn’t make use of the external data range.  Well, you can do the formatting, use it in calculations, or set layout to the external data range.

External Data Range Properties

External data range has some additional properties (don’t get confused with the connection properties) which you can easily use for controlling up the data, like for preserving the column width and cell formatting.

For changing the properties of the external data range tap the following options: Data> Connections group> Properties. Follow the step to make the changes.

  • For changing the external data ranges which are created using the Data Connection Wizard and MS Query. You need to use the dialog box of External Data Properties.

External Data Properties

  • To change the external data ranges created using Web query or an imported text file that retrieves HTML data. You need to go with the External Data Range Properties dialog box.

External Data Range Properties

  • For making changes in the external data ranges, which gets created from the Web query. You need to use the dialog box of XML Map Properties.

XML Map Properties

Method 5# Use Excel Repair Tool

Excel shows the external table is not in expected format error also when the file gets corrupt. If this is the case then I always recommended you all to use the most reliable solution to repair corrupt Excel files just like the Excel Repair Tool.

 Take quick glance at the features of this tool:

  • Instantly recovers any type of corrupted Excel files.
  • Efficiently fixes several Excel errors and repairs XLSX/XLS files.
  • Makes easy recovery of Excel data such as a chart, chart sheet, formula, cell comment, image, sort, filter, fields, forms, table, and reports very precisely.

Wrap Up:

Using all the options you can easily get rid of this Excel External table is not in the expected format error

If, in case you have any additional questions concerning the ones presented, do tell us in the comments section below or you can also visit our Repair MS Excel social account Facebook and Twitter page.

Good Luck….

Priyanka is an entrepreneur & content marketing expert. She writes tech blogs and has expertise in MS Office, Excel, and other tech subjects. Her distinctive art of presenting tech information in the easy-to-understand language is very impressive. When not writing, she loves unplanned travels.

I am having the code as follows in vb.net

Dim connectionString As String =[String].Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 8.0;HDR=YES;IMEX=1;""", filepath)
            Using oleDbConn As New OleDbConnection(connectionString)
                oleDbConn.Open()

when i try to open *.xls file it works fine but if I try to open *.xlsx page than it throws me an error External table is not in the expected format. I searched in net but could not sort out with it. Please someone help me to sort it out its really urgent


Use the following code as the Excel 2007 vcersion files are Excel 12.0

Dim connectionString As String =[String].Format(«Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=»»Excel 12.0 Xml;HDR=YES;IMEX=1;»»», filepath)

Best of luck!!

You need OLEDB 12 drivers installed on your machine.
Install from this link

http://www.microsoft.com/en-us/download/details.aspx?id=13255[^]
And the code will be like this .

string connectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + excelFileName + ";Extended Properties="Excel 12.0;HDR=YES;"";
            
            OleDbConnection excelConnection = new OleDbConnection(connectionString);
            excelConnection.Open();
            
            DataTable dtWorksheetTables = excelConnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
            if (dtWorksheetTables == null || dtWorksheetTables.Rows.Count == 0) return null;
            string worksheetName = GetWorksheetName(dtWorksheetTables);
            string strExcelSQL = "SELECT * FROM [" + worksheetName + "]";
            OleDbCommand oleDbCommand = new OleDbCommand(strExcelSQL, excelConnection);
            OleDbDataAdapter dataAdapter = new OleDbDataAdapter(oleDbCommand);
            DataTable excelDataTable = new DataTable();
            dataAdapter.Fill(excelDataTable);
            
            dataAdapter.Dispose();
            oleDbCommand.Dispose();
            excelConnection.Close();
            excelConnection.Dispose();
            GC.Collect();

Updated 30-Jan-13 23:36pm

I solved it by my self there was no problem with the connection string and everything was fine over there. The problem was with I was checking whether the file is open or not and I have not closed that file after that process. so it was used by other process and connection string was failing to access the excel sheet and it was throwing an error.

Please ensure that the file is not open or used by any other process while trying to read with *.xlsx file, If file is open also it works fine with *.xls and not in *.xlsx file keep it in mind while accessing *.xlsx file

You may have more than one excel/database sheet open in the background…. so make sure you have the right sheet open/closed. I closed all sheet the reconnected to database.

I tried all suggested here but none worked..and finally i found out that a particular cell was having more than 12k characters. so look out for length as well.

i was also facing an same issue in which while reading data from an excel i was getting external table error.

basically the excel file i was trying to read was code generated. code generated excel files do not have a [Program Name] property under Details tab. Due to which the driver mis behaves.

if u open and save as the file the issue will get resolved or else you can save the file before reading using the below code will solve ur issue

// Initialize Excel Application
Excel.Application excelApp = new Excel.Application();
// Open Existing Excel
Excel.Workbook excelWorkBook = excelApp.Workbooks.Open(«/Ur path..»);

// Save Excel
excelWorkBook.Save();
// Close Excel
excelWorkBook.Close();
// Close Excel Application
excelApp.Quit();

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Hi All,

I have a problem with open connection to Excel file. I use this open connection:

Con = New OleDbConnection(«Provider=Microsoft.Jet.OLEDB.4.0;Data Source=» & Destination & «;Extended Properties=»»Excel 8.0;HDR=YES;»»»)

it produces error «External table is not in the expected format «

The Excel i have to open is made from this code:

Dim oExcel As Excel.Application
Dim oBook As Excel._Workbook
Dim oSheet As Excel._Worksheet

connCE = New SqlCeConnection(«Data Source=» & SourcePath)

connCE.Open()

sql = «Select * From PRODUCT_TRANSACTION Order by Transaction_ID, Sales_ID, Shop_ID»
cmdCE = New SqlCeCommand(sql, connCE)
rsCE = cmdCE.ExecuteResultSet(ResultSetOptions.Scrollable)

‘Start a new workbook in Excel
oExcel = New Excel.Application
oBook = oExcel.Workbooks.Add

‘Add data to cells of the first worksheet in the new workbook
oSheet = CType(oBook.Worksheets(1), Microsoft.Office.Interop.Excel._Worksheet)
oSheet.Range(«A1»).Value = «Transaction_ID»
oSheet.Range(«B1»).Value = «Sales_ID»
oSheet.Range(«C1»).Value = «Shop_ID»
oSheet.Range(«D1»).Value = «Agent_ID»
oSheet.Range(«E1»).Value = «Transaction_Date»
oSheet.Range(«A1:E1»).Font.Bold = True

r = 2
Do While rsCE.Read()
    oSheet.Range(«A» & r).Value = rsCE.GetValue(rsCE.GetOrdinal(«Transaction_ID»))
    oSheet.Range(«B» & r).Value = rsCE.GetValue(rsCE.GetOrdinal(«Sales_ID»))
    oSheet.Range(«C» & r).Value = rsCE.GetValue(rsCE.GetOrdinal(«Shop_ID»))
    oSheet.Range(«D» & r).Value = rsCE.GetValue(rsCE.GetOrdinal(«Agent_ID»))
    oSheet.Range(«E» & r).Value = rsCE.GetValue(rsCE.GetOrdinal(«Transaction_Date»))
    r = r + 1
Loop
rsCE.Dispose()

sql = «Select * From PRODUCT_TRANSACTION_DETAIL Order by Transaction_ID, COA, COA_Category_ID»
cmdCE = New SqlCeCommand(sql, connCE)
rsCE = cmdCE.ExecuteResultSet(ResultSetOptions.Scrollable)

‘Add data to cells of the second worksheet in the new workbook
oSheet = CType(oBook.Worksheets(2), Microsoft.Office.Interop.Excel._Worksheet)
oSheet.Range(«A1»).Value = «Transaction_ID»
oSheet.Range(«B1»).Value = «COA_category_Id»
oSheet.Range(«C1»).Value = «COA»
oSheet.Range(«D1»).Value = «COA_Status»
oSheet.Range(«A1:D1»).Font.Bold = True

r = 2
Do While rsCE.Read()
    oSheet.Range(«A» & r).Value = rsCE.GetValue(rsCE.GetOrdinal(«Transaction_ID»))
    oSheet.Range(«B» & r).Value = rsCE.GetValue(rsCE.GetOrdinal(«COA_category_Id»))
    oSheet.Range(«C» & r).Value = rsCE.GetValue(rsCE.GetOrdinal(«COA»))
    oSheet.Range(«D» & r).Value = rsCE.GetValue(rsCE.GetOrdinal(«COA_Status»))
    r = r + 1
Loop

Try
    With SaveFileDialog1
        .Filter = «Excel files (*.xls)|*.xls»
        If .ShowDialog() = DialogResult.OK Then
            oBook.SaveAs(.FileName)
            MsgBox(«Export to Excel has done!!», MsgBoxStyle.OkOnly, «Export Data»)
        End If
    End With
Catch es As Exception
    MessageBox.Show(es.Message)
Finally
    If Not (oBook Is Nothing) Then
        oExcel.Quit()
        oSheet = Nothing
        oBook = Nothing
        oExcel = Nothing
    End If
End Try
rsCE.Dispose()

connCE.Close()

I use Excel 2007 to open the file and there is an error message «The file you are trying to open is in a different format than specified by the file extension. Verify that file is not corrupted and is from a trusted source before opening the file.»

I don’t know what is wrong with my code to create and save data to excel file ?? Or maybe something is wrong with my open connection ??

Anyone can help me please??

-Harrie-

  • Edited by

    Monday, October 12, 2009 7:42 AM

Hi @ASENGER22 ,

There are some ways to solve the problem, you can try them:

1.Install Microsoft.ACE.OLEDB.12.0.Drivers.

2.Check the OBDC Definition:To fix this Excel External table is not in the expected format error, check for the ODBC definition within the ODBC Manager. This is to verify whether the right driver is been used or not as per the file extension.

3.Enable the data connection:

Sometimes this problem of the external table is not in expected format error also occurs due to the disabled data connection option.

For enabling this data connection on a temporary basis, simply tap the “Enable Editing” or” Options” button.

If you wish to open only the safe Excel data files and needs to automatically enable the content. Then follow the below-mentioned steps:

  • Activate MS Excel, tap the File option from the menu.
  • Hit the Options>Trust Center>Trust Center Settings.
  • On the other hand, choose the External Content After that tap on the “Enable all Data Connections (not recommended)” option.
  • Hit the OK After that take the exit from the application and reopen your Excel spreadsheet.
  • You won’t see the “Data Connections have been disabled” message on your screen after making these steps.

Hope this helps you.

Best Regards,

Community Support Team _Yinliw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello.  I’m having trouble in PowerQuery with the above error, and I don’t see anything in this forum that matches my problem exactly.

Here is what I’m trying to do:

  • Load several XLSB files with a FROM FOLDER
  • Filter the list of sheets to one particular one that has the data I need.  The actual command that causes the error is:  Table.SelectRows(#»Expanded Custom», each ([Custom.Name] = «Labor
    Input»))

I have tried this with different files, different directories, I have copied the query file, I have rebuilt the query file from scratch and nothing seems to help.  The problem does not seem to happen when I first write the query, but when I exit out
and back in I consistently get the error.

I have pasted the entire query below (none of which is confidential).

Any ideas on this would be greatly appreciated.

thanks,

Brian

let
    Source = Folder.Files(«C:UsersBrianSkyDriveDocumentsWorkingModelModel Files»),
    #»Removed Columns» = Table.RemoveColumns(Source,{«Extension», «Date accessed», «Date modified», «Date created», «Attributes», «Folder Path»}),
    #»Added Custom» = Table.AddColumn(#»Removed Columns», «Custom», each Excel.Workbook([Content])),
    #»Expanded Custom» = Table.ExpandTableColumn(#»Added Custom», «Custom», {«Name», «Data»}, {«Custom.Name», «Custom.Data»}),
    #»Filtered Rows» = Table.SelectRows(#»Expanded Custom», each ([Custom.Name] = «Labor Input»)),
    #»Expanded Custom.Data» = Table.ExpandTableColumn(#»Filtered Rows», «Custom.Data», {«Column1», «Column2», «Column3», «Column4», «Column5», «Column6», «Column7»,
«Column8», «Column9», «Column10», «Column11», «Column12», «Column13», «Column14», «Column15», «Column16», «Column17», «Column18», «Column19»,
«Column20», «Column21», «Column22», «Column23», «Column24», «Column25», «Column26», «Column27», «Column28», «Column29», «Column30», «Column31»,
«Column32», «Column33», «Column34», «Column35», «Column36», «Column37», «Column38», «Column39», «Column40», «Column41», «Column42», «Column43»,
«Column44», «Column45», «Column46», «Column47», «Column48», «Column49», «Column50», «Column51», «Column52», «Column53», «Column54», «Column55»,
«Column56», «Column57», «Column58», «Column59», «Column60», «Column61», «Column62», «Column63», «Column64», «Column65», «Column66», «Column67»,
«Column68», «Column69», «Column70», «Column71», «Column72», «Column73», «Column74», «Column75», «Column76», «Column77», «Column78», «Column79»,
«Column80», «Column81», «Column82», «Column83», «Column84», «Column85», «Column86», «Column87», «Column88», «Column89», «Column90», «Column91»,
«Column92», «Column93», «Column94», «Column95», «Column96», «Column97», «Column98», «Column99», «Column100», «Column101», «Column102», «Column103»,
«Column104», «Column105», «Column106», «Column107», «Column108», «Column109», «Column110», «Column111», «Column112», «Column113», «Column114», «Column115»,
«Column116», «Column117», «Column118», «Column119», «Column120», «Column121», «Column122», «Column123», «Column124», «Column125», «Column126», «Column127»,
«Column128», «Column129», «Column130», «Column131», «Column132», «Column133», «Column134», «Column135», «Column136», «Column137», «Column138», «Column139»,
«Column140», «Column141», «Column142», «Column143», «Column144», «Column145», «Column146», «Column147», «Column148», «Column149», «Column150», «Column151»,
«Column152», «Column153», «Column154», «Column155», «Column156», «Column157», «Column158», «Column159», «Column160», «Column161», «Column162», «Column163»,
«Column164», «Column165», «Column166», «Column167», «Column168», «Column169», «Column170», «Column171», «Column172», «Column173», «Column174», «Column175»,
«Column176», «Column177», «Column178», «Column179», «Column180», «Column181», «Column182», «Column183», «Column184», «Column185», «Column186», «Column187»,
«Column188», «Column189», «Column190», «Column191», «Column192», «Column193», «Column194», «Column195», «Column196», «Column197», «Column198», «Column199»,
«Column200», «Column201», «Column202», «Column203», «Column204», «Column205», «Column206», «Column207», «Column208», «Column209», «Column210», «Column211»,
«Column212», «Column213», «Column214», «Column215», «Column216», «Column217», «Column218», «Column219», «Column220», «Column221», «Column222», «Column223»,
«Column224», «Column225», «Column226», «Column227», «Column228», «Column229», «Column230», «Column231», «Column232», «Column233», «Column234», «Column235»,
«Column236», «Column237», «Column238», «Column239», «Column240», «Column241», «Column242», «Column243», «Column244», «Column245», «Column246», «Column247»,
«Column248», «Column249», «Column250», «Column251», «Column252», «Column253», «Column254», «Column255»}, {«Column1», «Column2», «Column3», «Column4»,
«Column5», «Column6», «Column7», «Column8», «Column9», «Column10», «Column11», «Column12», «Column13», «Column14», «Column15», «Column16»,
«Column17», «Column18», «Column19», «Column20», «Column21», «Column22», «Column23», «Column24», «Column25», «Column26», «Column27», «Column28»,
«Column29», «Column30», «Column31», «Column32», «Column33», «Column34», «Column35», «Column36», «Column37», «Column38», «Column39», «Column40»,
«Column41», «Column42», «Column43», «Column44», «Column45», «Column46», «Column47», «Column48», «Column49», «Column50», «Column51», «Column52»,
«Column53», «Column54», «Column55», «Column56», «Column57», «Column58», «Column59», «Column60», «Column61», «Column62», «Column63», «Column64»,
«Column65», «Column66», «Column67», «Column68», «Column69», «Column70», «Column71», «Column72», «Column73», «Column74», «Column75», «Column76»,
«Column77», «Column78», «Column79», «Column80», «Column81», «Column82», «Column83», «Column84», «Column85», «Column86», «Column87», «Column88»,
«Column89», «Column90», «Column91», «Column92», «Column93», «Column94», «Column95», «Column96», «Column97», «Column98», «Column99», «Column100»,
«Column101», «Column102», «Column103», «Column104», «Column105», «Column106», «Column107», «Column108», «Column109», «Column110», «Column111», «Column112»,
«Column113», «Column114», «Column115», «Column116», «Column117», «Column118», «Column119», «Column120», «Column121», «Column122», «Column123», «Column124»,
«Column125», «Column126», «Column127», «Column128», «Column129», «Column130», «Column131», «Column132», «Column133», «Column134», «Column135», «Column136»,
«Column137», «Column138», «Column139», «Column140», «Column141», «Column142», «Column143», «Column144», «Column145», «Column146», «Column147», «Column148»,
«Column149», «Column150», «Column151», «Column152», «Column153», «Column154», «Column155», «Column156», «Column157», «Column158», «Column159», «Column160»,
«Column161», «Column162», «Column163», «Column164», «Column165», «Column166», «Column167», «Column168», «Column169», «Column170», «Column171», «Column172»,
«Column173», «Column174», «Column175», «Column176», «Column177», «Column178», «Column179», «Column180», «Column181», «Column182», «Column183», «Column184»,
«Column185», «Column186», «Column187», «Column188», «Column189», «Column190», «Column191», «Column192», «Column193», «Column194», «Column195», «Column196»,
«Column197», «Column198», «Column199», «Column200», «Column201», «Column202», «Column203», «Column204», «Column205», «Column206», «Column207», «Column208»,
«Column209», «Column210», «Column211», «Column212», «Column213», «Column214», «Column215», «Column216», «Column217», «Column218», «Column219», «Column220»,
«Column221», «Column222», «Column223», «Column224», «Column225», «Column226», «Column227», «Column228», «Column229», «Column230», «Column231», «Column232»,
«Column233», «Column234», «Column235», «Column236», «Column237», «Column238», «Column239», «Column240», «Column241», «Column242», «Column243», «Column244»,
«Column245», «Column246», «Column247», «Column248», «Column249», «Column250», «Column251», «Column252», «Column253», «Column254», «Column255»}),
    #»Removed Columns1″ = Table.RemoveColumns(#»Expanded Custom.Data»,{«Column81», «Column82», «Column83», «Column84», «Column85», «Column86», «Column87», «Column88»,
«Column89», «Column90», «Column91», «Column92», «Column93», «Column94», «Column95», «Column96», «Column97», «Column98», «Column99», «Column100»,
«Column101», «Column102», «Column103», «Column104», «Column105», «Column106», «Column107», «Column108», «Column109», «Column110», «Column111», «Column112»,
«Column113», «Column114», «Column115», «Column116», «Column117», «Column118», «Column119», «Column120», «Column121», «Column122», «Column123», «Column124»,
«Column125», «Column126», «Column127», «Column128», «Column129», «Column130», «Column131», «Column132», «Column133», «Column134», «Column135», «Column136»,
«Column137», «Column138», «Column139», «Column140», «Column141», «Column142», «Column143», «Column144», «Column145», «Column146», «Column147», «Column148»,
«Column149», «Column150», «Column151», «Column152», «Column153», «Column154», «Column155», «Column156», «Column157», «Column158», «Column159», «Column160»,
«Column161», «Column162», «Column163», «Column164», «Column165», «Column166», «Column167», «Column168», «Column169», «Column170», «Column171», «Column172»,
«Column173», «Column174», «Column175», «Column176», «Column177», «Column178», «Column179», «Column180», «Column181», «Column182», «Column183», «Column184»,
«Column185», «Column186», «Column187», «Column188», «Column189», «Column190», «Column191», «Column192», «Column193», «Column194», «Column195», «Column196»,
«Column197», «Column198», «Column199», «Column200», «Column201», «Column202», «Column203», «Column204», «Column205», «Column206», «Column207», «Column208»,
«Column209», «Column210», «Column211», «Column212», «Column213», «Column214», «Column215», «Column216», «Column217», «Column218», «Column219», «Column220»,
«Column221», «Column222», «Column223», «Column224», «Column225», «Column226», «Column227», «Column228», «Column229», «Column230», «Column231», «Column232»,
«Column233», «Column234», «Column235», «Column236», «Column237», «Column238», «Column239», «Column240», «Column241», «Column242», «Column243», «Column244»,
«Column245», «Column246», «Column247», «Column248», «Column249», «Column250», «Column251», «Column252», «Column253», «Column254», «Column255», «Content»,
«Custom.Name»}),
    #»Removed Columns2″ = Table.RemoveColumns(#»Removed Columns1″,{«Column4», «Column5», «Column9»}),
    #»Kept First Rows» = Table.FirstN(#»Removed Columns2″,200),
    #»Filtered Rows1″ = Table.SelectRows(#»Kept First Rows», each ([Column1] = «Labor»)),
    #»Renamed Columns» = Table.RenameColumns(#»Filtered Rows1″,{{«Name», «File»}, {«Column1», «Labor»}, {«Column2», «Billable»}, {«Column3», «Phase»},
{«Column6», «Shore»}}),
    #»Removed Columns3″ = Table.RemoveColumns(#»Renamed Columns»,{«Column7»}),
    #»Renamed Columns1″ = Table.RenameColumns(#»Removed Columns3″,{{«Column8», «Level»}, {«Column10», «Bill Rate»}, {«Column11», «Custom Rate»}, {«Column12»,
«Cost Rate»}, {«Column13», «Custom Cost»}, {«Column14», «GM»}, {«Column15», «Description»}}),
    #»Unpivoted Columns» = Table.UnpivotOtherColumns(#»Renamed Columns1″, {«File», «Labor», «Billable», «Phase», «Shore», «Level», «Bill Rate», «Custom
Rate», «Cost Rate», «Custom Cost», «GM», «Description»}, «Attribute», «Value»),
    #»Renamed Columns2″ = Table.RenameColumns(#»Unpivoted Columns»,{{«Attribute», «Month»}, {«Value», «Allocation»}}),
    #»Merged Queries» = Table.NestedJoin(#»Renamed Columns2″,{«Month»},MonthLookup,{«Name»},»NewColumn»,JoinKind.LeftOuter),
    #»Expanded NewColumn» = Table.ExpandTableColumn(#»Merged Queries», «NewColumn», {«MonthAdj»}, {«NewColumn.MonthAdj»}),
    #»Removed Columns4″ = Table.RemoveColumns(#»Expanded NewColumn»,{«Month»}),
    #»Reordered Columns» = Table.ReorderColumns(#»Removed Columns4″,{«File», «Labor», «Billable», «Phase», «Shore», «Level», «Bill Rate», «Custom Rate»,
«Cost Rate», «Custom Cost», «GM», «Description», «NewColumn.MonthAdj», «Allocation»}),
    #»Renamed Columns3″ = Table.RenameColumns(#»Reordered Columns»,{{«NewColumn.MonthAdj», «Month»}}),
    #»Filtered Rows2″ = Table.SelectRows(#»Renamed Columns3″, each ([Custom Rate] = «$-«))
in
    #»Filtered Rows2″

Solution 1

«External table is not in the expected format.» typically occurs when trying to use an Excel 2007 file with a connection string that uses: Microsoft.Jet.OLEDB.4.0 and Extended Properties=Excel 8.0

Using the following connection string seems to fix most problems.

public static string path = @"C:srcRedirectApplicationRedirectApplication301s.xlsx";
public static string connStr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=Excel 12.0;";

Solution 2

Thanks for this code :) I really appreciate it. Works for me.

public static string connStr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=Excel 12.0;";

So if you have diff version of Excel file, get the file name, if its extension is .xlsx, use this:

Private Const connstring As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=Excel 12.0;";

and if it is .xls, use:

Private Const connstring As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" + path + ";Extended Properties=""Excel 8.0;HDR=YES;"""

Solution 3

(I have too low reputation to comment, but this is comment on JoshCaba’s entry, using the Ace-engine instead of Jet for Excel 2007)

If you don’t have Ace installed/registered on your machine, you can get it at: https://www.microsoft.com/en-US/download/details.aspx?id=13255

It applies for Excel 2010 as well.

Solution 4

Just add my case. My xls file was created by a data export function from a website, the file extention is xls, it can be normally opened by MS Excel 2003. But both Microsoft.Jet.OLEDB.4.0 and Microsoft.ACE.OLEDB.12.0 got an «External table is not in the expected format» exception.

Finally, the problem is, just as the exception said, «it’s not in the expected format». Though it’s extention name is xls, but when I open it with a text editor, it is actually a well-formed html file, all data are in a <table>, each <tr> is a row and each <td> is a cell. Then I think I can parse it in a html way.

Solution 5

I had the same problem. which as resolved using these steps:

1.) Click File

2.) Select «save as»

3.) Click on drop down (Save as type)

enter image description here

4.) Select Excel 97-2003 Workbook

enter image description here

5.) Click on Save button

enter image description here

Related videos on Youtube

How to solve excel cannot open the file ... because the file format or file extension is not valid.

03 : 25

How to solve excel cannot open the file … because the file format or file extension is not valid.

How to Solve Excel Cannot Open the File ... Because the File Format or File Extension Is Not Valid.

02 : 36

How to Solve Excel Cannot Open the File … Because the File Format or File Extension Is Not Valid.

SAP S/4HANA Accelerated Plan to Product -SAP PP Overview.

01 : 39 : 26

SAP S/4HANA Accelerated Plan to Product -SAP PP Overview.

Shivakkumar Geetha Venkatesan

Excel Can't Insert New Cells Because it Would Push Non-Empty Cells Off the End of the Worksheet

04 : 28

Excel Can’t Insert New Cells Because it Would Push Non-Empty Cells Off the End of the Worksheet

Tutorial Excel | "Style from /xl/workbook.xml part (Workbook)" Excel 2007 Error |   PRA  | [½]™

05 : 21

Tutorial Excel | «Style from /xl/workbook.xml part (Workbook)» Excel 2007 Error | PRA | [½]™

How to Import Excel Files with Power Query; BUT there's a PROBLEM

08 : 28

How to Import Excel Files with Power Query; BUT there’s a PROBLEM

[THỦ THUẬT MÁY TÍNH] Sửa lỗi Excel không chèn thêm được cột, dòng (microsoft excel can't insert....)

03 : 39

[THỦ THUẬT MÁY TÍNH] Sửa lỗi Excel không chèn thêm được cột, dòng (microsoft excel can’t insert….)

Excel External table is not in the expected format. - C#

01 : 05

Excel External table is not in the expected format. — C#

Comments

  • I’m trying to read an Excel (xlsx) file using the code shown below. I get an «External table is not in the expected format.» error unless I have the file already open in Excel. In other words, I have to open the file in Excel first before I can read if from my C# program. The xlsx file is on a share on our network. How can I read the file without having to open it first?
    Thanks

    string sql = "SELECT * FROM [Sheet1$]";
    string excelConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pathname + ";Extended Properties="Excel 8.0;HDR=YES;IMEX=1;"";
    
    using (OleDbDataAdapter adaptor = new OleDbDataAdapter(sql, excelConnection)) {
        DataSet ds = new DataSet();
        adaptor.Fill(ds);
    }
    

    • FWIW I received this on an excel sheet, when attempting to open it, I was using the current ACE and the suggested extended properties. When I manually opened the file, it had that prompt at the top to enable editing, I need to sort out how to flip that bit automagically, but if you’re getting this you may just need to open the file, and then enable editing. I may look to see if i can open the file read-only, i saw something very far down in this thread about that.

  • Ironically, I received this error from someone else’s application (Scribe), but the explanation still solved the problem for me: «Save As» Excel 97-2003, and error fixed.

  • I have the ACE engine installed, but I need to know what reference I I need to include in my project so that my installer includes it. Not all machines that my app is installed on will necessarily have MS Office installed.

  • FYI: This will throw an OleDbException if you try to open an .xls file on a PC that does not have the Jet OleDb installed on it.

  • this may be unbelievable, but i simply change the sheet name to all lowercase and use sheet1$

  • Excel interop is not a recommended method of working with Excel. It can cause many issues and therefore should not be recommended.

  • I’m using LinqToExcel, and to get LinqToExcel to use that query string, I have to rename the file to xlsx. The spreadsheet in question really is an excel 97 spreadsheet, but the odbc provider doesn’t seem to care about that. Once I trick LinqToExcel into using the correct query string, the Provider apparently determines how to read the file independent of the file’s extension. Convenient loophole in my case.

  • Though this is an old post, I agree with MaxOvrdrv, using interop is not a good idea and should be avoided, if for no other reason than it requires a full install of Excel on the server.

  • I found it easier to just go to Programs and Features and Repair ACE. (For me, ACE is named Microsoft Access Runtime 2016). I assume that I was having this variant of the problem and that Repair just reset all the registry keys for me without me having to bother with regedit ;-).

  • @Smith this is not unbelievable because any time you open a file and make any change the format will be corrected. It is only helpful if you have control over the files being used. If your application is receiving files from random users then you are still stuck.

  • the code is perfectly working on 2003 excel connection string. After making Sheet name all in lower case in 2007, that also worked .I’m getting the sheet name dynamically though it was not working before.

  • I am still getting this error for XSLX files. I have Office 365 ProPlus installed on Windows Server 2012 R2. I installed all possible Access drivers for 2007, 2010 and 2013. I could not install 2016 drivers because of following error — support.office.com/en-us/article/…

  • You should absolutely not do this.

  • It does not. The problem can still occur, I have not yet found out why, since my files are all from excel 2007, and some of them works, some of them does not.

  • This was my case too, however my file was actually a XML. Still it would be nice to know how to import it using OBDC, but I don’t think its supported.

  • @Trex are you sure your last line of code is correct? Can you recheck it in some editor again?

  • @JobinJoseph but why- if you’re making a product for a company — how can you comply them to always have a filename in small letters- this is BS.

  • @GeorgeMcDowd Thanks for the solution, but in my case I do not have ACE driver installed, nor do my clients. Is there a way to read the file using JET? (x64bits processor and Office 2016 installed)

  • Do you have a source for that claim? I don’t know myself, just wondering. :-)

  • @DavidRogers, I ever saw something like XML ODBC Driver, but never used, you have a look at cdata.com/drivers/xml/odbc.

  • I ran into the same issue of the table not in the expected format. I verified my workbook had no hidden sheets. The actual worksheet name in the workbook is capitalized but in the C# code to parse the file I added .ToLower() for the tab name and now I can parse the excel file again. THANK YOU!

  • Same case here, I guess the magic started at opening the file with notepad, in fact I’m up-voting your answer because I didn’t scroll down to see your post until now (and now I already opened the file/parsed it with Html Agility pack…) but your answer deserves to be at the top, by pure logic : OPEN THE FILE FIRST! and see if it has some Excel-ish file-style inside!

  • If it is an html file, simply apply the extended properties like so: Extended Properties=""HTML Import;HDR=No;IMEX=1

  • The link now gives an error message — We're sorry, this download is no longer available.

  • you should not ask questions in your answers, if you need answers to your question ask them separately if needed.

  • Boo! Reverting to an outdated file format should not even be a consideration. At the time of this answer, the 97-2003 format was 16 years old and 12 years out of date. I could understand a few years, but more than a decade out of date should not suggest to a professional developer that the file format needs to be older.

  • @Nadeem_MK , I have the same question , I do not have ACE driver installed neither the other computers that should use this, is there a way to read the file using JET for Office 2016 or 365 . Did you solve this issue? Could you please help me? Thank you in advance

  • @FAtBalloon , I have the same question with *Naddem_MK, could you also help me with this problem?

  • Sorry guys, it’s been 10 years since I’ve done this. I wouldn’t know how to troubleshoot any further.

  • You have no idea how long I’ve been fighting this, turns out the XLSX files exported from our applications are just renamed HTML files. Thank you!!!

  • You saved my life .

  • Link works again

Recents

Понравилась статья? Поделить с друзьями:
  • Microsoft mathematics for word
  • Microsoft library for excel
  • Microsoft labels for word
  • Microsoft images for word
  • Microsoft has stopped working word