Coder Social home page Coder Social logo

Comments (5)

paulyoder avatar paulyoder commented on July 21, 2024

@eaitbrahim can you show me the code you're using with LinqToExcel

from linqtoexcel.

eaitbrahim avatar eaitbrahim commented on July 21, 2024

XLS

External table is not in the expected format.

XLSX

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.

It's a web app and I cannot install the Microsoft Access Database Engine 2010 Redistributable on the server since I don't control it...
My code is very simple:

private void ProcessExcel(string file)
{
try
{
var excel = new ExcelQueryFactory(file);

            var items = from i in excel.Worksheet<Item>(ConfigurationManager.AppSettings["WorksheetName"])
                        select i;

            ISerachDb db = new SerachDb();
            db.BatchDeleteAndInsert(items.ToList());

        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
    }

Thank you!
Date: Wed, 6 Mar 2013 14:18:45 -0800
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [LinqToExcel] External table is not in the expected format. (#16)

@eaitbrahim can you show me the code you're using with LinqToExcel


Reply to this email directly or view it on GitHub.

from linqtoexcel.

eaitbrahim avatar eaitbrahim commented on July 21, 2024

Any hint about this issue?

From: [email protected]
To: [email protected]; [email protected]
Subject: RE: [LinqToExcel] External table is not in the expected format. (#16)
Date: Wed, 6 Mar 2013 22:33:45 +0000

XLS

External table is not in the expected format.

XLSX

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.

It's a web app and I cannot install the Microsoft Access Database Engine 2010 Redistributable on the server since I don't control it...
My code is very simple:

private void ProcessExcel(string file)
{
try
{
var excel = new ExcelQueryFactory(file);

            var items = from i in excel.Worksheet<Item>(ConfigurationManager.AppSettings["WorksheetName"])
                        select i;

            ISerachDb db = new SerachDb();
            db.BatchDeleteAndInsert(items.ToList());

        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
    }

Thank you!
Date: Wed, 6 Mar 2013 14:18:45 -0800
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [LinqToExcel] External table is not in the expected format. (#16)

@eaitbrahim can you show me the code you're using with LinqToExcel


Reply to this email directly or view it on GitHub.

from linqtoexcel.

paulyoder avatar paulyoder commented on July 21, 2024

It looks like the exception is being caused because the ACE database engine not installed on the server. (see this Stack Overflow post)

Unfortunately because you can't install the Microsoft.ACE.OLEDB.12.0 engine on the web server, I don't think there is any other way to fix this issue.

from linqtoexcel.

mnasruul avatar mnasruul commented on July 21, 2024

as

from linqtoexcel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.