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

  • SEARCH
  • Home
  • 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 7834721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T13:17:10+00:00 2026-06-02T13:17:10+00:00

(self-answered, will accept when timer allows) I’ve built a simple library to import data

  • 0

(self-answered, will accept when timer allows)

I’ve built a simple library to import data from XLS/XLSX files. The code runs perfectly in my WinForms app but occasionally throws exceptions when I run it from ASP.Net. The “occasional” part seems to based on file size. My test file is about 16,000 rows and 18 columns totaling about 4MB as an XLSX file. If I drop rows (down to about 12,000) it works or if I drop columns (down to about 12) it works or certain combinations of these (14,000×14, etc) it works. This leads me to believe that I’m possibly running into a memory constraint somewhere. Below is the distilled code that’s not working:

Dim dsn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=""c:\test.xlsx"";Extended Properties=Excel 12.0"
Using Con As New System.Data.OleDb.OleDbConnection(dsn)
    Con.Open()'Exception thrown here
    Con.Close()
End Using

The exception that I’m getting is:

External table is not in the expected format

Searches for this all talk about getting the DSN correct and since it works on the desktop I know I’ve got that right.

My test machine is a Windows 7 64-bit with the Microsoft Access Database Engine 2010 Redistributable – 32 bit installed. (My machine has Office 2010 32 bit installed which is why I have the 32-bit ADE installed, it won’t let you install 64-bit.) I’ve set my IIS app pool to allow 32-bit applications which I needed to get ADE to work in the first place. I’m running the v4 Framework and as far as I know my IIS settings are pretty much standard.

Like I said, the code works every time when I run it through a WinForms app but occasionally fails through ASP.net on the same machine. Any ideas?

  • 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. Editorial Team
    Editorial Team
    2026-06-02T13:17:11+00:00Added an answer on June 2, 2026 at 1:17 pm

    Well, I finally got it working on my machine by adding some mode attributes to the DSN:

    Dim dsn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=""c:\test.xlsx"";Extended Properties=Excel 12.0;Mode=Share Deny Write;"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's simple - All I want to do is set who answered the question
Hello to all that read I am self learning C++ from a text book.
Update - Answered by self I see one has to make sure that the
self.data = sorted(self.data, key=attrgetter('word')) self.data is a list of Word objects. Word objects have
[ante-scriptum : this is a self answered question, you don't need to bother answering]
[[self enclosingScrollView] setHorizontalLineScroll:0]; the above api doesnt works. Help Appreciated...
[[self mainFrame] loadHTMLString:@<html><body><link href='main.css' rel='stylesheet' type='text/css' /></body></html> baseURL:nil]; I am trying to load a
self.myArray = [NSArray arrayWithObjects: [NSArray arrayWithObjects: [self generateMySecretObject], [self generateMySecretObject],nil], [NSArray arrayWithObjects: [self generateMySecretObject],
self.mood_scale = { '-30':Panic, '-20':'Fear', '-10':'Concern', '0':'Normal', '10':'Satisfaction', '20':'Happiness', '30':'Euphoria'} I need to set
self.boxesOnLift = [NSMutableArray array]; [self init]; [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@Animation.plist]; NSMutableArray *walkAnimFrames = [NSMutableArray array];

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.