Welcome to the WinForms feedback portal. We’re happy you’re here! If you have feedback on how to improve the WinForms, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

The following code creates an index sheet with hyperlinks to all other sheets in a workbook.  It works fine up to version 20.1.0.50.  In versions 20.1.0.51 and 20.1.0.52 an exception is thrown by 

indexSheet.HyperLinks.Add.


public void CreateIndexSheet(string fileName, string sheetName = "Index")
{
    var book = GetWorkbook(fileName);
    var indexSheet = CreateWorksheet(book, sheetName);
    indexSheet.Move(0);

    if (indexSheet != null)
    {
        int row = 1;
        foreach (var sheet in book.Worksheets)
        {
            if (!sheet.Name.Equals(sheetName, StringComparison.InvariantCultureIgnoreCase))
            {
                IHyperLink hyperlink = indexSheet.HyperLinks.Add(sheet.Range[$"A{row++}"]);
                hyperlink.Type = ExcelHyperLinkType.Workbook;
                hyperlink.Address = $"'{sheet.Name}'!A1";
                hyperlink.TextToDisplay = sheet.Name;
            }
        }

        indexSheet.UsedRange.AutofitColumns();
        SaveWorkbook(book, fileName);
    }
}

It is a null reference exception and it is generated in the constructor of Syncfusion.XlsIO.Implementation.HyperlinkImpl.


I have downgraded to version 20.1.0.47 to get a working system.