We're sorry GroupDocs doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.com

GroupDocsViewer shows Excel by splitting it into sheets


When I try to open the excel I uploaded in groupdocsviewer application, it divides the data in the pages and opens a new sheet and adds it there. I did not understand the logic. The screen outputs of the excel and the pages opened by the groupdocsviewer that I have loaded are attached. I am using the current version. see : 22.1.1

excelerror1.png (29.3 KB)
excelerror2.png (30.2 KB)
excelerror3.png (23.2 KB)

Sample.zip (9.6 KB)


Thank you for attaching the screenshots and the source file. By default we’re splitting worksheets into pages but you can configure Viewer to render a worksheet to a single page.

using (var viewer = new Viewer("sample.xlsx"))
    var viewOptions = HtmlViewOptions.ForEmbeddedResources();
    viewOptions.SpreadsheetOptions = SpreadsheetOptions.ForOnePagePerSheet();


I did what you said, problem solved, thank you.

I would like to ask for help with another issue. Do you have a demo application for .net mvc that works with the latest version of groupdocs? .net mvc version of this application.


Are you looking for ASP.NET Core MVC or ASP.NET MVC (.NET Framework) demo project?


I didn’t apply the change you mentioned.

         protected override Page RenderPage(Viewer viewer, string filePath, int pageNumber)
             var pageStream = new MemoryStream();
             var viewOptions = CreateViewOptions(pageStream);

             viewOptions.SpreadsheetOptions = SpreadsheetOptions.ForOnePagePerSheet();
             viewer.View(viewOptions, pageNumber);

             var bytes = pageStream.ToArray();
             var page = CreatePage(pageNumber, bytes);

             return page;

But windows also works fine. Linux also continues to divide into sheets in different ways in large excels.

How do I solve this problem for Linux.

I’m posting the excel I tested and the error screen.

windows.png (104.7 KB)
linux.png (69.6 KB)

textexcel.zip (1.4 MB)


It should work the same regarding the system you’re running the app. Please make sure that you have cleaned the cache if caching is enabled and you’re running the updated version of the application where SpreadsheetOptions is set to SpreadsheetOptions.ForOnePagePerSheet(). I’ve used this sample-app.zip (1.3 MB) to reproduce the issue but it worked as expected at my end on Windows and in Docker. Please let us know if it worked on your side.


We couldn’t get the final version of the code originating from our Devops processes, I think, when we restarted the services originating from it, the problem was fixed.

Thank you.


You’re welcome! Thank you for the feedback.


I thought I solved the error with the code block you sent, but I was wrong.

The error repeats like this. I am running the system. I am opening an excel file. It opens smoothly. When I open the second excel file it splits into too many pages. It opens a large number of sheets and these sheets become repetitive sheets. Or there are blank sheets.

When I try to find the error by debugging the code, you are redirecting the GroupDocs.Viewer.UI.SelfHost.Api.Viewer namespace to the GetViewInfo function within the GetDocumentInfoAsync function. Here is the source of the error. However, since this method is inside the GroupDocs.Viewer namespace, I am not authorized to access it. There is a problem with the function in GroupDocs.Viewer.Dll. dll in version 22.1.1 we are using the updated package.

I am sharing the 2 samples I have uploaded and their screenshots.

by the way, the problem is the same in every environment regardless of linux and windows.

I’m waiting for your help.

fine working excel example that opens on first boot.png (87.0 KB)

Second opened corrupted excel example.png (90.7 KB)

testexcel1-2.zip (1.3 MB)


Thank you for attaching both files. Unfortunately, I can’t reproduce this issue. When I’m running this sample-app.zip four sheets are rendered testexcel2_xlsx.png (78.0 KB).

It is likely that this is caching issue but it also can be a bug in other place. Can you please try running the sample app with the second file at your side and check if you can reproduce the issue?

When we put the code in the startup as in the sample application you sent, the problem was fixed. The problem persists because we put it in selfhostapi before.

viewOptions.SpreadsheetOptions = SpreadsheetOptions.ForOnePagePerSheet();

Thank you.

1 Like


Thank you for your response!