I have a small problem. I can create a a workbook without any apparent problems.
The thing is, when I try to print, the default number o copies is 12336.
I can’t find a property to set this value to 1.
What am I doing wrong?
Thanks in advance,
By default, the number of copies option should show 1 when you create a new excel file from the scratch. If you want to manipulate the attribute programmatically, I am afraid your request is linked with Print Settings that enforces some limitation. We need to check/analyze whether this print setting is saved with the Workbook or not. If the information is saved with the excel file, we can support it otherwise we cannot.
We will get back to you soon.
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thank you for considering Aspose.
Please use PageSetup.PrintCopies property to set Number of copies to be printed. Please see the following sample code in this regard.
//Instantiating a Workbook object
Workbook workbook = new Workbook();
//Open the template workbook
//Accessing the first worksheet in the Excel file
Worksheet worksheet = workbook.Worksheets;
//Setting the orientation to Portrait
worksheet.PageSetup.Orientation = PageOrientationType.Portrait;
//setting number of copies to be printed
worksheet.PageSetup.PrintCopies = 1;
//Save the workbook
Thank You & Best Regards,