×
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.
public static void main(String[] args) throws Exception {
Workbook wb = new XSSFWorkbook();
Sheet sheet = wb.createSheet("Sheet 1");
if (sheet instanceof XSSFSheet) {
((XSSFSheet)
sheet).setTabColor(IndexedColors.AQUA.index);
}
// Write the Document in file system
FileOutputStream out = new
FileOutputStream(new File(
"tabcolortest.xlsx"));
wb.write(out);
out.close();
wb.close();
System.out.println("tabcolortest.xlsx
written successully");
}
}
I think you will need a java stub to cast your sheet to an XSSFSheet, but,
you could just try defining it something like this in RPG:
// ----------------------------------------------------------------
// XSSFSheet_setTabColor()
//
// Sets the tab color of an XSSFSheet
//
// color - (input) Indexsed color Integer
// ----------------------------------------------------------------
dcl-pr XSSFSheet_setTabColor ExtProc(*JAVA
: XSSFSHEET_CLASS
: 'setTabColor');
type Like(jInt) value;
end-pr;
And just see if you can pass a Sheet object to it. I'm guessing no, but
since the object is really an XSSFSheet object (Sheet is an interface, not
a class), it might just work. But it definitely won't work if you are
trying to use an HSSFWorkbook.
Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx
-----broehmer@xxxxxxxxxxxxxxx wrote: -----
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
From: broehmer@xxxxxxxxxxxxxxx
Date: 11/28/2016 01:50PM
Subject: Re: Has anyone done TAB colors for HSSF POI?
Mark,
Method appears to be XSSFSheet.setTabColor
and then sheet.setTabColor(int colorIndex)
or sheet.setTabColor(num)
Bill
From: "Mark Murphy/STAR BASE Consulting Inc." <mmurphy@xxxxxxxxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 11/28/2016 12:45 PM
Subject: Has anyone done TAB colors for HSSF POI?
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>
I see in the java source a setTabColor for XSSF, but not one for HSSF.
Which package did you find that in?
Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx
-----broehmer@xxxxxxxxxxxxxxx wrote: -----
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
From: broehmer@xxxxxxxxxxxxxxx
Date: 11/28/2016 01:33PM
Subject: Has anyone done TAB colors for HSSF POI?
Just seems so minor of a thing to make tab colors in POI. I see the
setTabColor in the POI documentation but I haven't come across anyone
changing the HSSF stuff that Scott did. Any thoughts/examples?
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."
As an Amazon Associate we earn from qualifying purchases.
This thread ...
Re: Has anyone done TAB colors for HSSF POI?, (continued)
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.