我想将 excel 列的范围设置为 first,所以我使用这行代码给出它。
ExcelRange FirstcolumnRange = worksheet.Cells[rowPositionStart + 1, 1, dt.Rows.Count, 1];
因为这里的行位置设置为 4,我只想使用这一整列但抛出异常:
"Specified argument was out of the range of valid values.
Parameter name: Start cell Address must be less or equal to End cell address."