Free Support Forum - groupdocs.com

Unable to view thumbnail for ASP.Net MVC


#1

Hello there,

I am unable to get thumbnail for .xlsx kind of file while doing HTML Rendering.

@(Html.ViewerClientCode()
.TargetElementSelector("#test")
.Stream(Model.DocumentStream,Model.DocumentName,Model.DocumentExtension,Model.DocumentDisplayName,Model.UseCache,streamCreator:null)
.ShowFolderBrowser(false)
.ShowSearch(true)
.ShowThumbnails(true)
.ShowHeader(true)
.SupportPageReordering(true)
.SupportPageRotation(true)
.UsePdfPrinting(false)
.UseHtmlBasedEngine()
.BackgroundColor("#5E5E5E")
.ZoomToFitWidth()
)

#2

Hello Hari,

It is not an error or the bug, it is an intended and expected behaviour. “In real world” Excel file doesn’t have pages - for example, in the MS Excel you don’t see them. Excel file has tabs, and they are also supported by the GroupDocs.Viewer - you can find them in the bottom of a page. So absence of page miniatures is a standard behaviour.

But, most likely you had to spot this, page miniatures for Excel files are present, when displaying in the image-based mode. This is also a standard behaviour. In image-based mode GroupDocs.Viewer shows a document as a set of page images, and when a document doesn’t have pages at all (like Excel, text or HTML document, or image file), GroupDocs.Viewer forcibly splits the document onto parts, and shows these parts as pages. But this is not the “native” pages, rather this is “compelled” pages. That’s why HTML-based mode is much more appropriate when displaying Excel documents.

If you will have more questions please feel free to contact us.


#3

Hi Denis,

Thanks for your response. It indeed shows Tabs for the Excel file on the bottom of the viewer which is brilliant. Just wanted to confirm whether I was missing any parameters to show it that way so had to ask about that. I think it does pretty much everything what we want.

Many Thanks,
Hari