Free Support Forum -

Does ViewerHtmlHandler.GetPages support generate top n pages?

Hi Sir,
I use ViewerHtmlHandler.GetPages to accept large excel file (100 sheets).
It will spend 1.45 minutes.
ViewGenerator.RenderDocumentAsHtml(@"Large.xls", "Show me as watermark", Color.Purple);
May I generate html by excel sheet name, index or other search criteria?
Thanks for your help.


Hi Ho,

Thank you for your query,

The worksheets range to be rendered can be set like following code.

HtmlOptions options = new HtmlOptions();
options.PageNumbersToConvert = Enumerable.Range(1, 3).ToList();
//Get document pages in html form
List pages = htmlHandler.GetPages(guid, options);

However, it is not possible to render a worksheet by its name, but I have logged this as improvement ticket in our issue tracking system. You would be informed through this forum thread, as the improvement would have been taken place.

Happy Coding!

Hi Umar,
It was worked. Thank for your help.
I have another question.
The htmlHandler.GetPages method still need to spend almost 50 seconds.
Is possible to speed up it?


Hi Ho,

Yes it takes longer time to collect the structural information of a large size file. But I am going to log this as improvement ticket in our Issue Tracking System.

Have a nice day!

Hi Umar,
Thank you.
Have a nice day.