Hi, I was hoping you could help me. I am generating excel files from an asp.net
web page. I was having a problem where files containing lots of hyperlinks were coming out corrupt when trying to open in excel 2003. I have narrowed down the problem in this sample code:
Aspose.Cells.Workbook book = new Workbook();
Worksheet worksheet = book.Worksheets.Add(“test”);
for (int i = 1; i
{
for (int j = 1; j < 30; j++)
{
worksheet.Cells[i, j].PutValue(i.ToString() + “:” + j.ToString());
worksheet.Hyperlinks.Add(i, j, 1, 1, “http://test.com/
” + i + “/” + j + “.html”);
}
}
book.Save(@“c:\test.xls”, FileFormatType.Excel2003);
To simplify the problem. Seems somewhere around 60,000-70,000 links is where the file becomes corrupt.
Any help would be greatly appreciated.
Thanks!
Rob C
sorry, the code didn’t paste properly, here’s the full code to try
Aspose.Cells.Workbook book = new Workbook();
Worksheet worksheet = book.Worksheets.Add(“test”);
for (int i = 1; i
{
for (int j = 1; j < 30; j++)
{
worksheet.Cells[i, j].PutValue(i.ToString() + “:” + j.ToString());
worksheet.Hyperlinks.Add(i, j, 1, 1, “http://test.com/
” + i + “/” + j + “.html”);
}
}
book.Save(@“c:\test.xls”, FileFormatType.Excel2003);
weird, again didn’t paste properly. all is there except the end of the first for loop should be i going from 1 to 3000, to make 90000 links altogether… thx.
Hi,
Thanks for providing us details.
Well, you cannot add more than 67800 (approx.) hyperlinks in worksheet. I think, the maximum limit should be in b/w the numbers i.e.., 67800 - 67820 and for your info, the limit is set forth by MS Excel.
I think you may try to change your code and modify the loop(s) to add maximum hyperlinks accordingly.
Thank you.
Thanks for the quick reply. I’ll take a look at limiting how many hyperlinks i put into a single worksheet.