This is a migrated thread and some comments may be shown as answers.

winform workbook hyperlink

0 Answers 37 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
zake
Top achievements
Rank 1
zake asked on 29 Mar 2019, 03:04 AM

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. 

 

 

No answers yet. Maybe you can help?

Tags
Spreadsheet
Asked by
zake
Top achievements
Rank 1
Share this question
or