Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 56391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:31:38+00:00 2026-05-10T17:31:38+00:00

Ok, let’s see if I can make this make sense. I have a program

  • 0

Ok, let’s see if I can make this make sense.

I have a program written that parses an Excel file and it works just fine. I use the following to get into the file:

string FileToConvert = Server.MapPath('.') + '\\App_Data\\CP-ARFJN-FLAG.XLS'; string connectionString = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + FileToConvert + ';Extended Properties=Excel 8.0;'; OleDbConnection connection = new OleDbConnection(connectionString); connection.Open(); //this next line assumes that the file is in default Excel format with Sheet1 as the first sheet name, adjust accordingly OleDbDataAdapter adapter = new OleDbDataAdapter('SELECT * FROM [CP-ARFJN-FLAG$]', connection); 

and this works just fine. But when I try it on the actual file (it is supplied to me by another program) I get this error:

System.Data.OleDb.OleDbException: External table is not in the expected format. at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at wetglobe.Page_Load(Object sender, EventArgs e) 

BUT, this is where I think the problem lies. If I take that file, and save it with my local Excel, first I get this popup:

CP-ARFJN-FLAG.XLS may contain features that are not compatible with Text (Tab delimited). Do you want to keep the workbook in this format?

  • To Keep this format, which leaves out any incompatible features, click Yes.
  • To preserve the features, click No. Ten save a copy in the latest Excel format.
  • To see what might be lost, click Help.

If I click No and then save it as the current Excel format, the program will then work fine.

So I am assuming this is saved in some crazy old Excel format?

I suppose my questions would be:

  • How can I tell what Excel version saved this?
  • How can I parse it in its current state?
  • -or- Can I programatically save it as a newer version?

I hope that is clear… Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:31:38+00:00Added an answer on May 10, 2026 at 5:31 pm

    It sounds like the XLS file generated by your third-party app may not really be in Excel format – it might actually be a tab-delimited text file with an .xls extension.

    Try opening it with a text editor and see.

    If it is tab delimited, you can ditch the OleDB adapter and open/parse it as a standard text file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 110k
  • Answers 110k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I'm a big fan of icons. Heck, the textarea I'm… May 11, 2026 at 9:34 pm
  • Editorial Team
    Editorial Team added an answer This is a bug in Subversion that has been solved.… May 11, 2026 at 9:34 pm
  • Editorial Team
    Editorial Team added an answer I found the answer that suited me perfectly. A lil… May 11, 2026 at 9:34 pm

Related Questions

Ok, let's see if I can make this make sense. I have a program
Ok, let's leave the debate of whether friendship breaks encapsulation, and actually try elegantly
Ok, let's leave the debate of whether friendship breaks encapsulation, and actually try elegantly
Ok, so let's say that I want to try virtualization in my environment. I
OK, so Sybase (12.5.4) will let me do the following to DROP a table

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.