Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# EEPLUS AutoFitColumns()-对象引用异常_C#_Excel_Exception - Fatal编程技术网

C# EEPLUS AutoFitColumns()-对象引用异常

C# EEPLUS AutoFitColumns()-对象引用异常,c#,excel,exception,C#,Excel,Exception,我试图在excel工作表上执行一些操作,excel加载了perferct,但当我绑定到AutoFitColumns()时,我遇到了异常 加载后excel不为空 而且单元格不是空的 但我在AutoFitColumns()上遇到了异常; stackTrace错误 at OfficeOpenXml.Drawing.ExcelPicture..ctor(ExcelDrawings drawings, XmlNode node) at OfficeOpenXml.Drawing.ExcelDr

我试图在excel工作表上执行一些操作,excel加载了perferct,但当我绑定到AutoFitColumns()时,我遇到了异常

加载后excel不为空

而且单元格不是空的

但我在AutoFitColumns()上遇到了异常;

stackTrace错误

at OfficeOpenXml.Drawing.ExcelPicture..ctor(ExcelDrawings drawings, XmlNode node) at OfficeOpenXml.Drawing.ExcelDrawing.GetDrawing(ExcelDrawings drawings, XmlNode node) at OfficeOpenXml.Drawing.ExcelDrawings.AddDrawings() at OfficeOpenXml.Drawing.ExcelDrawings..ctor(ExcelPackage xlPackage, ExcelWorksheet sheet) at OfficeOpenXml.ExcelWorksheet.get_Drawings() at OfficeOpenXml.ExcelRangeBase.AutoFitColumns(Double MinimumWidth, Double MaximumWidth) at OfficeOpenXml.ExcelRangeBase.AutoFitColumns() at AmsalemLogic.Domain.Caching.InfraStructure.ExcelHelper.MarkRows(MemoryStream stream, List`1 RowsNumToMark, List`1 problematicRowsNumToMark, Dictionary`2 DuplicationToMark, Int32 start, Int32 end, Int32 width, Boolean rightToLeft) at AmsalemLogic.NewLogic.Classes.Reports.SupplierPayment.SupplierPaymentControlHelper.PerformMatching(MemoryStream stream, SupplierPaymentControlResult SupplierPaymentTable, String Supplier, String CurrencyCode) in C:\AmsaemLogic\AmsalemLogic.NewLogic\Classes\Reports\SupplierPayment\SupplierPaymentControlHelper.cs:line 48 at AmsalemLogic.ReservationReportService.ExecuteSupplierPaymentControl(SupplierPaymentControlParameters reportParameters) in C:\AmsaemLogic\AmsalemLogic3_1\WebMethodes\ReservationReportService.svc.vb:line 799 at SyncInvokeExecuteSupplierPaymentControl(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) 在OfficeOpenXml.Drawing.ExcelPicture..ctor(ExcelDrawings图形,XmlNode节点) 在OfficeOpenXml.Drawing.ExcelDrawing.GetDrawing(ExcelDrawings,XmlNode节点) 在OfficeOpenXml.Drawing.ExcelDrawings.AddDrawings()中 在OfficeOpenXml.Drawing.ExcelDrawings..ctor(ExcelPackage xlPackage,ExcelWorket工作表) 在OfficeOpenXml.ExcelWorksheet.get_Drawings()上 在OfficeOpenXml.ExcelRangeBase.AutoFitColumns(双最小宽度,双最大宽度) 在OfficeOpenXml.ExcelRangeBase.AutoFitColumns()上 在AmsalemLogic.Domain.Caching.InfraStructure.ExcelHelper.MarkRows(MemoryStream stream,List`1 RowsNumToMark,List`1 problematicRowsNumToMark,Dictionary`2 DuplicationToMark,Int32 start,Int32 end,Int32 width,Boolean rightToLeft) 在C:\AmsaemLogic\AmsalemLogic.NewLogic.Reports.SupplierPayment.SupplierPaymentControlHelper.PerformMatch(MemoryStream stream,SupplierPaymentControlResult SupplierPaymentTable,String Supplier,String CurrencyCode)中的C:\AmsaemLogic\AmsalemLogic\Classes\Reports\SupplierPaymentControlHelper.cs:第48行 在C:\AmsaemLogic\AmsalemLogic3\u 1\WebMethodes\ReservationReportService.svc.vb中的AmsalemLogic.ReservationReportService.executesSupplierPaymentControl(SupplierPaymentControlParameters报告参数)中执行SupplierPaymentControl(SupplierPaymentControlParameters报告参数):第799行 在SyncInvokeExecuteSupplierPaymentControl(对象,对象[],对象[])上 位于System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(对象实例、对象[]输入、对象[]输出) 位于System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&rpc)
是否单击“查看详细信息”,然后展开StackTrace?将该窗格的内容复制到您的问题中。对不起,我忘记了。我添加了stackTrace。