Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

ExcelReader.GetWorksheet() throwing inexplicable error #1026

@katycodesstuff

Description

@katycodesstuff

What would you like to submit? (put an 'x' inside the bracket that applies)

  • question
  • bug report
  • feature request

Issue description

I can't get the worksheet using ExcelReader. It was working previously (so not a file address error or something stupid) and then started throwing this error: System.Runtime.InteropServices.SEHException: 'External component has thrown an exception.'

I've tried restarting the computer to no effect, also I have looked in task manager and there appears to be no Excel file still running.

Initially it was in this form, directly copied from the 'Get started' Accord page:

        DataTable table = new ExcelReader(worksheetFileAddress).GetWorksheet("Sheet1"))

It's currently like this in an effort to correctly dispose of it (which is what I thought the issue was):

        ExcelReader excelReader = new ExcelReader(worksheetFileAddress);

        using (DataTable table = excelReader.GetWorksheet(1))
        {
            double [,] dataMatrix = table.ToMatrix();
        }

I've also tried:

ExcelReader excelReader = new ExcelReader(worksheetFileAddress);

DataTable table = excelReader.GetWorksheet(1));

Can anyone suggest a solution? Thanks.
Edit: File is an .xlsx file in Excel 2016. I've installed the two Microsoft Access Database Engine 2010 for x86 and x64 system.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions