Hello,
Thanks for your inquiry.
Kindly note that when using our Spire.XLS to create a new instance of the Workbook object, the default version is Excel2003, which is limited to 65536 rows. If you need to set more rows of data, please specific a higher version like the following sample code.
Besides, the code "wSheet[1, 100000]" addresses to (first row, 100000th column), not (100000th row, first column). And please note that the maximum number of columns in an excel file is 16384.
- Code: Select all
using (Workbook wBook = new Workbook())
{
wBook.Version = ExcelVersion.Version2016;
using (Worksheet wSheet = wBook.Worksheets.Add("S1"))
{
//wSheet[1, 100000].Value = "ABC"; // To set value of the cell (First row, 100000th column). The maximum number of columns is 16384, and this cannot be accessed.
//wSheet[1, 16384].Value = "ABC"; // To set value of the cell (First row, 16384th column). This is OK.
wSheet["A100000"].Value = "ABC"; // To set value of the cell (100000th row, First column). This is OK.
wSheet[100000,1].Value = "ABC"; // To set value of the cell (100000th row, First column). This is OK.
}
}
Sincerely,
Brian
E-iceblue support team