我正在阅读OfficeOpenXml.ExcelWorksheet并在Collection的中间获取ArgumentOufOfRangeException.
我是这样读的process.Information = sheet.Cells[line, i++].Text;.在这条线i = 22,而sheet.Dimension.Column = 28.

当我正在调试和枚举集合时,我发现.Text当.Value方法显示正确的值时,抛出异常.
根据异常堆栈跟踪,System.Text.StringBuilder.Insert()方法抛出异常
----编辑----在接受答案后我意识到问题不仅仅在于阅读.我使用额外的列(导入成功或不成功)回复相同的文件,当我正在进行表格格式化时,我再次得到相同的错误,所有这些都归因于System.Text.StringBuilder.Insert()方法.我正在尝试自动调整列sheet.Column(22).AutoFit()
这是堆栈跟踪
at System.Text.StringBuilder.Insert(Int32 index, Char* value, Int32 valueCount)
at System.Text.StringBuilder.Insert(Int32 index, Char value)
at OfficeOpenXml.Style.XmlAccess.ExcelNumberFormatXml.ExcelFormatTranslator.ToNetFormat(String ExcelFormat, Boolean forColWidth)
at OfficeOpenXml.Style.XmlAccess.ExcelNumberFormatXml.ExcelFormatTranslator..ctor(String format, Int32 numFmtID)
at OfficeOpenXml.Style.XmlAccess.ExcelNumberFormatXml.get_FormatTranslator()
at OfficeOpenXml.ExcelRangeBase.GetFormattedText(Boolean forWidthCalc)
at OfficeOpenXml.ExcelRangeBase.get_TextForWidth()
at OfficeOpenXml.ExcelRangeBase.AutoFitColumns(Double MinimumWidth, Double MaximumWidth)
at OfficeOpenXml.ExcelRangeBase.AutoFitColumns(Double MinimumWidth)
at OfficeOpenXml.ExcelRangeBase.AutoFitColumns()
at OfficeOpenXml.ExcelColumn.AutoFit()
at SkiptraceAPI.Models.ProcessosRepository.formatExcel(ExcelPackage package, Boolean addValidation) in
Run Code Online (Sandbox Code Playgroud) 我正在构建一个 AngularJs 应用程序,我正在使用 DropzoneJs 的 dropzone。我需要使用成功和错误回调,因为我必须访问服务器响应。我有一个问题,如果我使用回调,previewTemplate 会发生变化......那么,我可以在回调中更改 previewTemplate 吗?
如果我不使用这里的回调结果模板和代码:


var myDropzone = $("#storageDropzone").dropzone({
url: firstUrl,
});
Run Code Online (Sandbox Code Playgroud)
如果我使用回调,“勾号”或“叉号”不会出现:


var myDropzone = $("#storageDropzone").dropzone({
url: firstUrl,
error: function (file, response) {
console.log("Erro");
console.log(response);
},
success: function (file, response) {
console.log("Sucesso");
console.log(response);
},
complete: function (file) {
console.log("Complete");
}
});
Run Code Online (Sandbox Code Playgroud)
那么,我可以更改回调中的 previewTemplate 吗?或者简单地说,保持存在的那个?
我有两个型号Contract和Addendum.合同has_many :addendums和附录belongs_to :contract
创建新合同时,将自动创建新的附录,但创建新附录需要一些附加要素.如何value在合同表格中添加一个字段,该字段是附录中的属性,而不是合同中的属性?
我在 C# WepApi 上使用 PetaPoco,我必须执行一个存储过程来删除许多表上的行。删除它的行数是可变的(可以是几个或太多),因此,有时 PetaPoco 会抛出超时异常。使用 PetaPoco 是否有可能“调用”存储过程并在过程完成之前关闭连接。存储过程不返回任何值,WebApi 不需要知道它何时结束......
c# ×3
angularjs ×1
azure ×1
callback ×1
dropzone.js ×1
excel ×1
forms ×1
logging ×1
petapoco ×1
sql-server ×1