I have sucessfully exported ExcelWorkBook to PDF using Excel2010 but when I tried same solution on server with Excel 2013 it always throws Exception on ExportAsFixedFormat Method
Here is the Code
object misValue = System.Reflection.Missing.Value;
string paramExportFilePath = @"C:\Test2.pdf";
Excel.XlFixedFormatType paramExportFormat = Excel.XlFixedFormatType.xlTypePDF;
Excel.XlFixedFormatQuality paramExportQuality = Excel.XlFixedFormatQuality.xlQualityStandard;
bool paramOpenAfterPublish = false;
bool paramIncludeDocProps = true;
bool paramIgnorePrintAreas = true;
xlNewWorkBook.ExportAsFixedFormat(paramExportFormat, paramExportFilePath, paramExportQuality, paramIncludeDocProps, paramIgnorePrintAreas, misValue, misValue, paramOpenAfterPublish, misValue);
Here is the Exception:
HRESULT: 0x800A03EC
I tried to use both Office14 and Office15 libraries but same result with both of them