Dani
Dani

Reputation: 15069

Excel Interop Exception (2007 installed, Office.Interop.Excel used - ver 1.6 (12)) - 0x800A03EC HResult

Trying to make an excel file using this code:

app = new Excel.Application();
    app.Visible = false;
    object misValue = System.Reflection.Missing.Value;

    workbook = app.Workbooks.Add(misValue);
    worksheet = (Excel.Worksheet)workbook.Worksheets.get_Item(1);

and all get if I'm trying to do anything (worksheet.Cells[0,0] = "text") results in {"Exception from HRESULT: 0x800A03EC"}

I've tried changing the locale:

System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");

and I've tried also setting "Trust access to the VBA project object model" to true.

Nothing helps.

any ideas ?

Upvotes: 0

Views: 408

Answers (1)

ChickSentMeHighE
ChickSentMeHighE

Reputation: 1706

Does this happen when you write to any other cell?

This is based off 2003, but I don't think you can write into cell 0,0. The start of the cell is 1,1 which is (A,1)

Upvotes: 1

Related Questions