winform workbook hyperlink

1 posts, 0 answers
  1. zake
    zake avatar
    17 posts
    Member since:
    Nov 2018

    Posted 28 Mar Link to this post

    dear telerik support team

     

    I am using Telerik 2015 winform, I was creating hyperlink in workbook for opening file while user click that hyperlink cell.

    Workbook workbook = new Workbook();
                workbook.Worksheets.Add();
                Worksheet activeWorksheet = workbook.ActiveWorksheet;
                activeWorksheet.Cells[1, 1].SetValue("ok");
     
    HyperlinkInfo webAddres = HyperlinkInfo.CreateHyperlink(@"C:\Users\OutputTes.xlsx", "tes");
    CellIndex a1Index = new CellIndex(1, 1);
    activeWorksheet.Hyperlinks.Add(a1Index, webAddres);
     
    //Save workbook
    IWorkbookFormatProvider formatProvider = new XlsxFormatProvider();
    using (Stream otput = new FileStream(pathFile2, FileMode.Create))
    {
          formatProvider.Export(workbook, otput);
    }

     above is my code, but I still got error. 

     

     

Back to Top