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 8380755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:32:16+00:00 2026-06-09T16:32:16+00:00

I’m using Codeplex Excel Data Reader to read an excel. The problem that I

  • 0

I’m using Codeplex Excel Data Reader to read an excel. The problem that I face is It reads Excel 97-2003 documents without any difficulty, but when reading Excel 207-2010 documents using ExcelReaderFactory.CreateOpenXmlReader(stream), it output’s an empty data set. Did anyone faced this problem. And is any one has any solution for this?

The read method is as follows

private DataSet ReadExcel(string fileName, string extention)

{

    DataSet dsData = null;
    FileStream stream = File.Open(fileName, FileMode.Open, FileAccess.Read);
    IExcelDataReader excelReader = null;

    try
    {

        if (extention.Equals("xls"))
        {
            //1. Reading from a binary Excel file ('97-2003 format; *.xls)
            excelReader = ExcelReaderFactory.CreateBinaryReader(stream);
        }
        else
        {
            //2. Reading from a OpenXml Excel file (2007 format; *.xlsx)
            excelReader = ExcelReaderFactory.CreateOpenXmlReader(stream);
           // excelReader = ExcelReaderFactory.CreateBinaryReader(stream);
        }

        excelReader.IsFirstRowAsColumnNames = false;
        dsData = excelReader.AsDataSet();
    }
    catch (Exception ex)
    {
        throw ex;
    }
    finally
    {
        if (excelReader != null)
        {
            excelReader.Close();
        }
    }
    return dsData;
}
  • 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-09T16:32:17+00:00Added an answer on June 9, 2026 at 4:32 pm

    8000401a indicates it was something to do with Run As Logon Failure.

    Steer clear of server-side automation of office. Or use XML to work with Excel spreadsheets on the server.

    According to the support issues with the Excel Data Reader:

    Design and usage are great. So far only issue I’ve had is with certain
    XLSX file not parsing correctly (reading in wrong sheets, missind cell
    values, etc). To resolve these issues, I had to rebuild Excel.dll
    using latest SharpZipLib from
    http://www.icsharpcode.net/OpenSource/SharpZipLib/Download.aspx. As
    others have said, project needs an update, but is still good.

    Or just use the standard micrsoft way:

    Microsoft.Office.Interop.Excel.Application xlApp;
    Workbook wb = null;
    try
    {
    wb = xlApp.Workbooks.Open(filePath, false, true,5,null,"WrongPAssword");
    }
    
    foreach (object possibleSheet in wb.Sheets)
       {
       var aSheet = possibleSheet as Worksheet;
         if (aSheet != null)
         {
    ....
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using http://powertools.codeplex.com and/or http://docx.codeplex.com to join word documents. The first document contains a
I am using FileUpload control of asp.net and uploading the excel with some data.
I am using codeplex NVelocity library on .net and i want to catch an
I am using http://sharpcompress.codeplex.com/ to compress a directory: using (var archive = ZipArchive.Create()) {
Im using the css friendly adapters from codeplex with sharepoint. It appears to be
I've been using SQLite for Windows Phone ( http://wp7sqlite.codeplex.com/ ) trying to do a
1) I have been working on fetching data from an excel sheet i can
I just recently started using this library (the one from CodePlex), but I ran
So, i'm looking at the TekPub sample for ASP.NET MVC2 ( http://mvcstarter.codeplex.com/ ) using
Using the DotNetZip Library (http://dotnetzip.codeplex.com/) is there a way to move files from one

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.