I am getting this error ---- Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot perform
runtime binding on a null reference
at CallSite.Target(Closure, CallSite, Object)
at System.Dynamic.UpdateDelegates.UpdateAdExecute1[T0,TRET](CallSite, site,
T0 arg0)
And the line of code that is causing me issues is this one --- it is supposed to be converting the spreadsheet to a pdf
oWB = oXL.ActiveWorkbook; oXL.ActiveWorkbook.ExportAsFixedFormat(Type:Excel.XLFixedFormatType.xlTypePDF, Filename: "Test.pdf", Quality: XlFixedFormatQuality.xlQualityStandard, OpenAfterPublish: false);