usmanazizgroupdocs
8/25/2016 - 8:20 AM

RenderExcelAsHtmlWithInternalHyperlinkPrefix.vb

' For complete examples and data files, please go to https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET
Dim config As ViewerConfig = Utilities.GetConfigurations()

' Create html handler
Dim htmlHandler As New ViewerHtmlHandler(config)
Dim guid As String = DocumentName

' Set html options to show grid lines
Dim options As New HtmlOptions()
options.CellsOptions.InternalHyperlinkPrefix = "http://contoso.com/api/getPage?name="

'InternalHyperlinkPrefix value may contain page number placeholder which will be substituted with referenced sheet number.
options.CellsOptions.InternalHyperlinkPrefix = "http://contoso.com/api/getPage?number={page-number}"

Dim container As DocumentInfoContainer = htmlHandler.GetDocumentInfo(guid)

Dim pages As List(Of PageHtml) = htmlHandler.GetPages(guid, options)

For Each page As PageHtml In pages
    'Save each page at disk
    Utilities.SaveAsHtml(Convert.ToString(page.PageNumber + "_") & DocumentName, page.HtmlContent)
Next