Open brendancolebf opened 1 month ago
@brendancolebf
Thank you for reporting this issue. To display a complete worksheet you set the following configuration in your Program.cs
file.
builder.Services
.AddControllers()
.AddGroupDocsViewerSelfHostApi(config =>
{
config.SetLicensePath("c://license//GroupDocs.Viewer.lic");
config.ConfigureHtmlViewOptions(viewOptions => {
viewOptions.SpreadsheetOptions = SpreadsheetOptions.ForOnePagePerSheet();
viewOptions.SpreadsheetOptions.RenderGridLines = true;
viewOptions.SpreadsheetOptions.RenderHeadings = true;
});
})
.AddLocalStorage("./Files")
.AddLocalCache("./Cache");
I have added the following lines
config.ConfigureHtmlViewOptions(viewOptions => {
viewOptions.SpreadsheetOptions = SpreadsheetOptions.ForOnePagePerSheet(); // render complete worksheet
viewOptions.SpreadsheetOptions.RenderGridLines = true; // render grid lines
viewOptions.SpreadsheetOptions.RenderHeadings = true; // render headings
});
Make sure to cleanup Cache
folder and run the app one more time with dotnet run
.
Select the file and the output will be the following:
Sample app: sample-viewer-app.zip
We'll consider enabling this options by default in future version.
To test all the features you can get a temporary license. There are a couple of steps that should be performed:
Go to https://purchase.groupdocs.com/buy and select Product Family
Add to Cart
button.
Create account and continue after you log in.
Click Proceed
on the next page.
Enter contact information and make sure to enter proper email address. Click Get a temporary license
.
Check you mail box.
Now you can set a proper path to the temporary license in Program.cs
file e.g.
config.SetLicensePath("c://license//GroupDocs.Viewer.lic");
Let us know if you have any questions.
I really should have checked the documentation better, my apologies. I can see the merits of both, so it's hard to say which should be the default.
Thanks for the quick resolution.
@brendancolebf
No problem! Let us know if you have any questions.
Have a nice day!
What happened: Excel documents are broken up by their page breaks. Each page is rendered with a button along the bottom row as if they're sheets, but these are duplicated for each page of each sheet. These pages also appear to not render beyond the 2nd or 3rd.
What you expected to happen: If possible, Excel documents should be rendered by sheet, rather than by print margins. If this can't be achieved, the experience should be improved to make it more obvious you're previewing by page rather than by sheet.
It should also be possible to preview more than just the first few pages.
How to reproduce it: I've attached a small Excel document I created to reproduce the issue. Within Excel, you can see by enabling Page Layout > Gridlines > Print that there's a page break on each column. This is also apparent by checking the print preview in File > Print. Excel Test.xlsx
When previewing, it will be rendered with a tab for each page, and in my testing, occasionally the 4th page will get stuck on Loading.
Source code sample: N/A
Environment: