i use the HSSF Excel-Tool from Scott Klement on iSeries.
I try to setup the Margins on my Excelfile to Print my Excel with smaller margins. But the margin methods aren't in the Scott Klement HSSF as an RPGLE Prototype.
My Question: How can i use the setMargin Method in RPGLE? How do I have to write the prototype in HSSF to use it on my RPGLE-Code?
Here the Java-Code that i need for my RPG:
sheet.setMargin ( Sheet.LeftMargin, 0.25 );
sheet.setMargin ( Sheet.RightMargin, 0.25 );
sheet.setMargin ( Sheet.TopMargin, 0.25 );
sheet.setMargin ( Sheet.BottomMargin, 0.5 );
Here for example the running RPG Code for setting the page in Landscape
PrintOptions = SSSheet_getPrintSetup(sheet);
SSPrintSetup_setLandscape(PrintOptions: *ON);
Prototype in HSSF:
D SSSheet_getPrintSetup...
D PR like(SSPrintSetup)
D extproc(*JAVA
D : SHEET_CLASS
D : 'getPrintSetup')
D SSPrintSetup_setLandscape...
D PR extproc(*JAVA
D : PRINTSETUP_CLASS
D : 'setLandscape')
D setting 1N value
You'd need to look at the Java interface
And build the RPG prototype, something like so: (My Java is a bit rusty)
Now you can call it