× 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.



Mark
Thanks. Looks like your suggestion is going to work. I modified one of my
programs that only uses setAlignment and setBorder enums and got it to
work properly. I'm guessing I have other programs that will need to be
changed for other enums though, like setFillPattern.
What I have now is;
// enum constant
dcl-c HORIZONTALALIGNMENT_ENUM
'org.apache.poi.ss.usermodel.HorizontalAlignment';

// Class object for HorizontalAlignment enum
dcl-s SSHorizontalAlignment
object(*JAVA: HORIZONTALALIGNMENT_ENUM);

// Prototype for enum 'valueof' method
dcl-pr HorizontalAllignment_valueOf
Like(SSHorizontalAlignment)
ExtProc(*JAVA: HorizontalAlignment_ENUM: 'valueOf')
Static;
value Like(jString) const;
end-pr;

// Progotype for setAlignment
dcl-pr SSCellStyle_setAlignment
ExtProc(*JAVA: CELLSTYLE_CLASS: 'setAlignment');
horizAlign Like(SSHorizontalAlignment) const;
end-pr;

Not sure I implemented the 'valueof' method properly since Java isn't my
strong suite. Maybe you can show me a better way.

D horizAlign s like(SSHorizontalAlignment)
D ALIGN_CENTER s like(jString)
D ALIGN_CENTER_SELECTION...
D s like(jString)
D ALIGN_FILL s like(jString)
D ALIGN_GENERAL s like(jString)
D ALIGN_JUSTIFY s like(jString)
D ALIGN_LEFT s like(jString)
D ALIGN_RIGHT s like(jString)

// Create enum constants for setAlignment
ALIGN_CENTER = new_String('CENTER');
ALIGN_CENTER_SELECTION = new_String('CENTER_SELECTION');
ALIGN_FILL = new_String('FILL');
ALIGN_GENERAL = new_String('GENERAL');
ALIGN_JUSTIFY = new_String('JUSTIFY');
ALIGN_LEFT = new_String('LEFT');
ALIGN_RIGHT = new_String('RIGHT');

// Create the enum value for ALIGN_CENTER
horizAlign = HorizontalAllignment_valueOf(ALIGN_CENTER);

// Apply the enum value to the cell style
ssCellStyle_setAlignment(LgHeading: horizAlign);




______________________________________________________________________
This e-mail and any files transmitted with it may be privileged and
confidential and intended solely for the use of the individual or
entity to which it is addressed. If the reader of this message is
not the intended recipient, or an employee or agent responsible for
delivering this message to the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
communication is strictly prohibited. If you have received this
e-mail in error, please notify the sender immediately by replying
to this e-mail and deleting it from your computer.
______________________________________________________________________

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.