|
Looks like setMargin, not setmargin that you have.michaelrtr@xxxxxxxxx 2007/09/10 15:42 >>>
Hi Scott, thanks for the speedy replywhen
This is what I tried...
Changed my hssf,
D BOTTOMMARGIN...
D C 3
D LEFTMARGIN...
D C 0
D RIGHTMARGIN...
D C 1
D TOPMARGIN...
D C 2
D HSSFSheet_setMargin...
D PR EXTPROC(*JAVA
D :'org.apache.poi.hssf.usermodel-
D .HSSFSheet'
D :'setmargin')
D margin 5I 0 value
D marginsize 5I 0 value
Then changed my RPG.
HSSFsheet_setmargin(sheet: leftmargin: 0)
But I still the following error
received Java exception "java.lang.NoSuchMethodError: setmargin"
user
calling method "setmargin" with signature "(SS)V" in class
"org.apache.poi.hssf.usermodel.HSSFSheet".
Am I still doing something wrong?
Prevesh Kuni
Developer
Smollan Group
(011) 640 8154
kunip@xxxxxxxxxxxxx .
The POI HSSF documentation shows the following for the setmarginsschollenberger@xxxxxxxxxxxxxxxxxx 2007/09/10 15:14 >>>
method:
setMargin
public void setMargin(short margin, double size)
Sets the size of the margin in inches.
Parameters:
margin - which margin to get
size - the size of the margin
So your method call should be defined as:
HSSFsheet_setmargin(sheet: margin: size)
Where margin is defined as a constant. Here are the values from the
POI Javadoc also:
BottomMargin 3
LeftMargin 0
RightMargin 1
TopMargin 2
http://poi.apache.org/apidocs/index.html
________________________________
Scott A. Schollenberger
Director, R&D
Phone: (610) 239-9988 ext. 305
Fax: (610) 239-9995
Email: sschollenberger@xxxxxxxxxxxxxxxxxx
2011 Renaissance Blvd., Suite 100
King of Prussia, PA 19406
This message and any attachments are confidential to the ordinary
of the e-mail address to which it was addressed and may also beyou
privileged. If you are not the addressee you may not copy, forward,
disclose or use any part of the message or its attachments and if
have received this message in error, please notify the sendernot
immediately by return e-mail and delete it from your system. The
sender
does not accept liability for any errors or omissions in the context
of
this message that arise as a result of Internet transmission. Any
opinions contained in this message are those of the author and are
given or endorsed by the Harris company or office through which thisand
message is sent unless otherwise clearly indicated in this message
the authority of the author to so bind the Harris entity referred toI
is
duly verified.
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Prevesh Kuni
Sent: Monday, September 10, 2007 8:54 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: HSSF Problem
Hi,
Does anybody know how to set the left, right and top margins of an
Excel
Spreadsheet using the HSSF that Scott wrote?
I am in a bit of a pickel and any help would be greatly appreciated,
have already managed to set the orientation to Landscape,defined themailing
paper size and scaling and managed to print the gridlines...the code
included if anyone is interested I have tried using the following
code...
D LEFTMARGIN...
D C 0
D HSSFSheet_setMargin...
D PR EXTPROC(*JAVA
D :'org.apache.poi.hssf.usermodel-
D .HSSFSheet'
D :'setmargin')
D marginsize 5I 0 value
D HSSFSheet_setgridsprinted...
D PR EXTPROC(*JAVA
D :'org.apache.poi.hssf.usermodel-
D .HSSFSheet'
D :'setPrintGridlines')
D grids 1N value
sheet = HSSF_newSheet(book: strname)
HSSFsheet_setgridsprinted(sheet: *on)
HSSFsheet_setmargin(sheet: leftmargin) [which ends in error -
'NoSuchMethod']
Anyone?
Prevesh Kuni
Developer
Smollan Group
(011) 640 8154
kunip@xxxxxxxxxxxxx .
--
This is the RPG programming on the AS400 / iSeries (RPG400-L)
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,mailing
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l .
--
This is the RPG programming on the AS400 / iSeries (RPG400-L)
listlist
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l .
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l .
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.