Hi,
Can anybody tell me how can resolve this error & what is the reason for this
Exception from HRESULT: 0x800A03EC
Exception from HRESULT: 0x800A03EC
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
AartiRank #2,383 · 594 reputationPosted Jan 5, 2012, 1:25 AM EST
This Exception comes on copying data from excel sheet in wrong way.
can you please elaborate your question .
Piotr4 reputationPosted May 2, 2012, 3:14 AM EDT
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);
}