× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



BRILLIANT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thanks Michael you're a Star!
Here's the code for the rest of the margins if anybody is
interested.....
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 8F value [Noticed I've
changed the type here as well]

/free
HSSFsheet_setmargin(sheet: leftmargin: 0) ;
HSSFsheet_setmargin(sheet: rightmargin: 0) ;
HSSFsheet_setmargin(sheet: topmargin: 0) ;
/end-free



Prevesh Kuni
Developer
Smollan Group
(011) 640 8154
kunip@xxxxxxxxxxxxxx


michaelrtr@xxxxxxxxx 2007/09/10 15:42 >>>
Looks like setMargin, not setmargin that you have.

On 9/10/07, Prevesh Kuni < KuniP@xxxxxxxxxxxxx > wrote:
Hi Scott, thanks for the speedy reply

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"
when

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 .


sschollenberger@xxxxxxxxxxxxxxxxxx 2007/09/10 15:14 >>>
The POI HSSF documentation shows the following for the setmargin
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
user
of the e-mail address to which it was addressed and may also be
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
you
have received this message in error, please notify the sender
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
not
given or endorsed by the Harris company or office through which this
message is sent unless otherwise clearly indicated in this message
and
the authority of the author to so bind the Harris entity referred to
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,
I
have already managed to set the orientation to Landscape,defined the
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)
mailing
list 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
list
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
list
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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.