Hi,
Can anybody tell me how can resolve this error & what is the reason for this
Exception from HRESULT: 0x800A03EC
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
PiotrPosted May 2, 2012, 7:14 AM
I have same error when I try to open Excel with ==> book = ObjExcel.Workbooks.Open(ExcelFileName);
What is strange I get this error in ~10% of all processed excels.
I tried to give additional args for excel opening method but I didn't get any success.
Do you have any suggestions?
Regards,
Piotr
Code below:
Excel.Application ObjExcel = new Excel.Application();
Excel.Workbook book;
Excel.Worksheet sheet;
Excel.Range range1 = null, range2 = null;
CultureInfo ci = new CultureInfo("en-US");
System.Threading.Thread thisThread = System.Threading.Thread.CurrentThread;
thisThread.CurrentCulture = new CultureInfo("en-US");
try
{
book = ObjExcel.Workbooks.Open(ExcelFileName);
sheet = (Excel.Worksheet)book.Worksheets[2];
range1 = sheet.get_Range(sheet.Cells[14, 5], sheet.Cells[14, 5]);
range2 = sheet.get_Range(sheet.Cells[14, 4], sheet.Cells[14, 4]);
TranslatorID = range2.Text.ToString();
EditorID = range1.Text.ToString();
}
catch (Exception ex)
{ System.Windows.Forms.MessageBox.Show(ex.Message);
}
AartiPosted Jan 5, 2012, 6:25 AM
This Exception comes on copying data from excel sheet in wrong way.
can you please elaborate your question .