excel print setup fit width not correct

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

excel print setup fit width not correct

Postby pitc » Thu Oct 14, 2021 2:36 pm

The svyUtils$Excel provides a sheet print setup feature.
I want the excel print to fit in 1 page wide by multiple pages high as needed.
The code I have is:
Code: Select all
   var printSetup = scopes.svyExcelUtils.createPrintSetup();
//   printSetup.setFitHeight(1);// do not set - multiple pages high
   printSetup.setFitWidth(1);// one page wide

then later after creating a sheet:
Code: Select all
   var sheet = workbook.createSheet(sheet_title);
   sheet.setPrintSetup(printSetup);//ensures that the sheet is correctly setup

But the resultant excel file appears to not be one page wide when I print it out.
Is this a bug or do I need something else in set up?
Posts: 82
Joined: Thu Nov 14, 2019 2:22 pm
Location: Ottawa, Ontario, Canada

Return to Programming with Servoy

Who is online

Users browsing this forum: Bing [Bot] and 4 guests