gpt4 book ai didi

c# - 我正在处理一个表,其中最后一列是 16368 位数字,在这种情况下,代码失败

转载 作者:太空宇宙 更新时间:2023-11-03 15:04:50 25 4
gpt4 key购买 nike

我已经创建了一个类似的主题,我找到了如何找到最后一列。后续代码仅适用于少量日期。我正在处理一个表,其中最后一列是 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 有 limitations :

其中之一(您应该检查上面链接中的其他人):

Worksheet size 1,048,576 rows by 16,384 columns

关于c# - 我正在处理一个表,其中最后一列是 16368 位数字,在这种情况下,代码失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44180637/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com