Conversion of Excel file to pdf getting error
I am Converting Excel file (i.e 2003,2007,2010 and office 365) to pdf but i am geetting error like (System.Runtime.InteropServices.COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC) or (Exception from HRESULT: 0x800A03EC) on windows server2012 R2. Docx , doc , pptx,ppt file successfully converted into pdf and i have install office 365 on the server (i.e windows server 2012 R2). Pleas help me out. i am getting stuck from last 4 to 5 days.

Abhishek JaiswalRank #126 · 17.5K reputationPosted Mar 11, 2015, 6:15 AM EDT
Did you check if it's a permission issue? It's possible that you are trying to save the file to a location and .NET doesn't have the permissions to write to that location. Meanwhile you can try this article
http://stackoverflow.com/questions/4408336/system-runtime-interopservices-comexception-0x800a03ec
Jacky Han35 reputationPosted Apr 7, 2015, 7:50 PM EDT
// load Excel file
Workbook workbook = new Workbook();
workbook.LoadFromFile("D:\\test.xlsx");
// Set PDF template
PdfDocument pdfDocument = new PdfDocument();
pdfDocument.PageSettings.Orientation = PdfPageOrientation.Landscape; pdfDocument.PageSettings.Width = 970;
pdfDocument.PageSettings.Height = 850;
//Convert Excel to PDF using the template above
PdfConverter pdfConverter = new PdfConverter(workbook);
PdfConverterSettings settings = new PdfConverterSettings();
settings.TemplateDocument = pdfDocument;
pdfDocument = pdfConverter.Convert(settings);
// Save and preview PDF
pdfDocument.SaveToFile("sample.pdf");
Gowtham RajamanickamRank #57 · 29K reputationPosted Apr 7, 2015, 8:31 PM EDT