我正在使用最后一列是16368地方numerarii表,在这种情况下,代码失败
我已经创build了一个类似的话题,我发现如何find最后一列。 随后的代码仅适用于less量的date。 我正在使用最后一列是16368位数的表格,在这种情况下,代码失败了。
//number of the last column int x = MatrixRange.Collumns.Count; //here I check to see what is the numbering column //(oddly enough, I get always the correct number, but the column the program does not issue textBox1.Text = x.ToString(); for (int Rnum = 6; Rnum <= MatrixRange.Cells.Count; Rnum++) { if ((MatrixRange.Cells[Rnum,x] as Excel.Range).Value2 != null) { //at this point the program will either ignore this function or shows an error, //if x = 10, not 16368, then the code works great string TabZeile = (MatrixRange.Cells[Rnum,x] as Eexcel.Range).Value2.ToString(); neuXml.Cells [Rnum,4] = TabZeile; } }
这是因为Excel有限制 :
其中之一(你应该检查链接上面的其他人):
工作表大小1,048,576行16,384列
- 在function区中使用.ico图像
- 不规则的System.Data.OleDb.OleDbException(0x80004005):无效的参数问题
- 如何在二维图中标记Excel X和Y轴
- OLEDB读取Excel的性能
- 是否有可能使用ClosedXML在Excel中执行查找?
- System.Runtime.InteropServices.COMException(0x800706BA):RPC服务器不可用。 (从HRESULTexception:0x800706BA)
- 如何使用C#interop保护表单,但允许select
- 从另一个Excel工作表插入Excel工作表
- 在Excel中将Excel表格拉伸到PowerPoint中