+ Reply to Thread
Results 1 to 2 of 2

C# : Error appearing when uploading excel 2003 instead of excel 2007

  1. #1
    Registered User
    Join Date
    11-01-2011
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    1

    C# : Error appearing when uploading excel 2003 instead of excel 2007

    Hi,

    I have one issue here where i need help to.
    I'm writing in C# and i have a function where user will upload a static format excel file
    and the system will upload it to db.

    I'm using sample code as below:
    string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strFileName + "; Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1;\"";

    Issue is, when i upload a excel 2007 SAVED file, everything is ok but when my user upload an excel 2003 SAVED file, then error will appear "Selected collating sequence not supported by operating system"

    Can anyone help me on this.

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: C# : Error appearing when uploading excel 2003 instead of excel 2007

    tbh I'm surprised that
    @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strFileName + "; Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1;\"";
    works at all for 2007 files since they are XML based an are essentially zip files. I would have thought that you need to use the ACE connector.

    Your issue seems to be related to the language have a look here and here

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1