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



First, you are correct about the call to new_cellRangeAddress(0,10,0,5); should use : instead of , to separate parameters.

Second, to enable this, you only need to modify hssf_h.

Third, what is the error message, I am unsure what your problem is. Is setAutoFilter not found in org.apache.poi.ss.usermodel.Sheet?

Do you have range declared as a Java Object?

dcl-s range Like(CellRangeAddress);

What does you code look like?

Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx


-----broehmer@xxxxxxxxxxxxxxx wrote: -----
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
From: broehmer@xxxxxxxxxxxxxxx
Date: 02/17/2016 03:33PM
Subject: Update Excel with RPG


POI does it starting with version 3.7, here is a Java example:
Workbook wb = new HSSFWorkbook(); //or new XSSFWorkbook();
Sheet sheet = wb.createSheet();
sheet.setAutoFilter(new CellRangeAddress(0,100,0,10));

Now, Scott's HSSF prototypes do not include the setAutoFilter method,
but that can be added

// ----------------------------------------------------------------
// ssSheet_setAutoFilter()
//
// sets an auto filter for a range of cells
// ref - a range to set the filter on
// ----------------------------------------------------------------
dcl-pr ssSheet_setAutoFilter
ExtProc(*JAVA
: SHEET_CLASS
: 'setAutoFilter');
ref Like(CellRangeAddress) const;
end-pr;

Call in RPG using HSSF this way to set auto filter on the first ten rows
and first five columns:

wb = new_XSSFWorkbook();
sheet = ss_newSheet(wb: 'Sheet1');
range = new_cellRangeAddress(0,10,0,5);
ssSheet_setAutoFilter(sheet: range);


Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx

Back in December Mark Murphy injected the above as a modification to
Scott's HSSF_h.
I'm wondering if Mark would elaborate on what he did.
I tried to add this addition to HSSF_h (using POI-3.11) and I'm not sure
what I'm missing
as far as modifications go because while compiling a program it says the
setAutoFilter
is not defined.
Also, I'm concerned that what's shown ...Address(0,10,0,5) probably
should be (0:10:0:5)
at least in the rpg code. Should there be entries in HSSF_h as well as
HSSF4?

D SSSheet_setAutoFilter...
D PR EXTPROC(*JAVA: SHEET_CLASS
D :'setAutoFilter')
D ref like(CellRangeAddress) const

Thanks!
Bill

"CONFIDENTIALITY NOTICE: This e-mail transmission (and/or the attachments
accompanying it) contain confidential information belonging to the sender.
The information is intended only for the use of the intended recipient.
If you are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution or the taking of any action in reliance
on the contents of the information is strictly prohibited. Any
unauthorized interception of this transmission is illegal under the law.
If you have received this transmission in error, please promptly notify
the sender by reply e-mail, and then destroy all copies of the
transmission."




"CONFIDENTIALITY NOTICE: This e-mail transmission (and/or the attachments accompanying it) contain confidential information belonging to the sender. The information is intended only for the use of the intended recipient. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of the information is strictly prohibited. Any unauthorized interception of this transmission is illegal under the law. If you have received this transmission in error, please promptly notify the sender by reply e-mail, and then destroy all copies of the transmission."

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.