Free Support Forum -

Creating Excel using template file: imported sheet is always selected


I’m trying to create 2-sheet xlsx file. First sheet is calculated data, second one is from App_data file.
When I get the resulting Excel from my web application, I see that BOTH sheets are selected, and if I try to amend first, cell in the second one also get amended.
I tried 20+ workarounds to deselect it, no success.

Please help.

new License().SetLicense(licFile);
// wbook contains sheet[0] with some data.
if (wbook.Worksheets.Count < 1)
throw new UserException(“Uploaded file should have at least one work sheet.”);

var glossary = new Workbook();
wbook.Worksheets[wbook.Worksheets.Add(“Attributes Glossary”).Index].Copy(glossary.Worksheets[0]);
catch(Exception e)
throw new UserException(“Cannot add Attribute Glossary”, e);
// after that sheets[0] and [1] both are selected in output


Which version of the product you are using?

Please download and try our latest fix/version: Aspose.Cells for .NET v7.4.2.5 and let us know your feedback.
If you still find the issue, kindly provide your template Excel file here, we will evaluate your issue soon.

Thank you.