×
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.
I may need to join some HSSF forum, but I figured I start here. I'm
using Scott Klement's HSSFR4 service program to read a template
spreadsheet, add data to it, and save it as a new spreadsheet.
One of the requirements is to have headings that span several columns.
Product Class headings span B - K, Family headings span C - K. Rather
than programmatically set the style for the headings, I look for special
values (e.g. '~classhdg') and use the style from that cell as the style
for the added headings.
The style for the Class headings is white font on blue background. Using
Scott's shortcut, hssf_text, I put the class heading text into column B
with the class heading style picked up from the '~classhdg' cell. Then
I merge cells B - K. The style (white on blue, center align, font, etc)
expands to cover the appropriate cells.
When I do something similar for Family headings, all works well except
the grid lines. The cell from which I get the style has a bottom grid
line. When applied to the family heading cell, it carries the grid
line. When cells C - K are merged, the grid line only shows on cell C.
If I merge the cells first, same thing -- only cell C gets the bottom
grid line.
In Excel, if I put a bottom grid line on a cell, then merge that cell
with other cells on the same row, the grid line disappears. If I merge
the cells first, then add the grid line, it covers all the merged cells.
I really don't want to do this programmatically set the grid lines, I
would really like to get the setting from the designated style cell.
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.