Bug 6802 - Format Cells... dialog does not popup
Summary: Format Cells... dialog does not popup
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 1.5.1
Hardware: Sun Solaris
: P5 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2002-03-01 21:15 UTC by Andy Oliver
Modified: 2005-08-22 21:07 UTC (History)
3 users (show)

patch to load my "=Name" formula (1.29 KB, patch)
2002-10-03 05:18 UTC, Mark O'Donohue
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Oliver 2002-03-01 21:15:53 UTC
[ 507900 ] Format Cells... dialog does not popup
Email:    (?)
2002-01-24 01:29 Priority:
Submitted By:
Aki Nieminen (akini) Assigned To:
Glen Stampoultzis (gstamp)
HSSFSerializer Status:
Format Cells... dialog does not popup
I have created a testrun case, which is using your
testprogram. This testrun will show few problems:

Problem1: 2nd mouse button/Format Cells... dialog does
not popup on every cell.

Add A Comment:
Please log in!

If you cannot login, then enter your email address here:

DO NOT enter passwords or confidential information in your message!



Date: 2002-01-25 20:55
Sender: gstamp
Logged In: YES 

Wierd... even pasting into a new workbook does not fix the 
issue.  Creating a cell manually with same style does not 
seem to cause a problem however.  Might try producing two 
samples manually and one automatically and use biffview to 
look at the differences.

Date: 2002-01-24 13:59
Sender: acoliver2
Logged In: YES 

I've seen this.  I'm not sure its a bug in HSSF.. .  It
seems to happen in *other* files as well.  (I had an old
formula1 file this seemed to happen in)

Date: 2002-01-24 13:59
Sender: acoliver2
Logged In: YES 

I've seen this.  I'm not sure its a bug in HSSF.. .  It
seems to happen in *other* files as well.  (I had an old
formula1 file this seemed to happen in)

Attached Files:
Name Description Download
No Files Currently Attached

Field Old Value Date By
assigned_to acoliver2 2002-01-24 13:59 acoliver2
Comment 1 Andy Oliver 2002-03-07 02:51:51 UTC
anyone know anything about this and how we can fix it?  Its kinda annoying.
Comment 2 william.barker 2002-03-07 05:56:45 UTC
I just was playing around with Poi, and just managed to "fix" this in my test 
servlet.  It was broken when I did just:
(where row1 is instanceof HSSFCellStyle).
Excel suddenly becomes happy when I do:
The really strange thing is that both row-1 and row-2 (which has no border 
styles in my case) are broken.  All the other rows work (which also have no 
border styles).

I'm still a BIFF novice, so no patch.  But I hope this helps.
Comment 3 Glen Stampoultzis 2002-03-10 10:50:03 UTC
Having trouble downloading the test case.  Can someone paste in if they can get 
to it?
Comment 4 Glen Stampoultzis 2002-03-10 12:22:29 UTC
Okay very wierd.  It appears it doesn't like black as a border colour.  Very 
strange.  Will need to ask Andy about this as I don't know much about how Excel 
handles colours.
Comment 5 Andy Oliver 2002-03-10 14:37:26 UTC
I'll have to play with this some. . I wonder if it would care if we set the
border to white and yet turned it off.  If it didn't then that might be just
what we need.  not sure what we'd do for a black border that is on..  Glen, we
should both look at this (I probably won't get to it until next weekend at
best), do a sheet with a single cell with a black border, then do the same in
HSSF -- what's different?  (use our BiffViewer) -- I'm betting there is some
kind of flag we're not setting if we do not EXPLICITY set it to black...  Just a
guess though.  Might also want to check Microsoft's "Knowledge" base..  There
are a few Doc bugs for the Dev kit in there.  "And thats all I have to say aobut

changed version to 1.5 (target)
Comment 6 Glen Stampoultzis 2002-03-11 01:55:38 UTC
Okay, turns out we were using incorrect colour constants for black and 
automatic.  Now fixed in CVS.  Should be included in the final 1.5 release.
Comment 7 Andy Oliver 2002-03-17 23:58:19 UTC
yeppers.. . including only the libraries in the distribution plus the examples
and running yields this:

Exception in thread "main" java.lang.NoClassDefFoundError:
	at org.apache.poi.util.POILogFactory.<clinit>(POILogFactory.java:76)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<clinit>(HSSFWorkbook.java:113)
	at org.apache.poi.hssf.usermodel.examples.NewSheet.main(NewSheet.java:73)
Comment 8 David Brown 2002-08-28 22:34:11 UTC
Tried the 1.5.1 release, used the following code to set the background and border:

        HSSFCellStyle otherStyle = wb.createCellStyle();
        HSSFRow anotherRow = sheet.createRow((short)10);
        anotherRow.createCell((short)7).setCellValue("a label");

(wb is an instance of HSSFWorkbook, sheet is an HSSFSheet)

Still can't get the "Format Cells..." menu selection to work in Excel (from
Office XP).  Even if the cell is copied and pasted, Format Cells doesn't work.
Comment 9 Andy Oliver 2002-08-28 23:13:54 UTC
Don't use HSSFColorConstants.  Use HSSFColor.


If it still doesn't work then let me know.
Comment 10 Mark O'Donohue 2002-10-03 05:18:54 UTC
Created attachment 3327 [details]
patch to load my "=Name" formula
Comment 11 Andy Oliver 2002-10-03 10:39:39 UTC
attachment was a mistake (it doesn't have anything to do with this bug)
Comment 12 Price Ellington 2002-11-14 15:35:05 UTC
I'm still having the same problem after changing my code to use HSSFColor 
instead of HSSFColorConstants, I'm not able to get the format cell dialog box.  
Is this still an open issue, or am I doing someting wrong?  Below is how I'm 
creating cells and their styles.  Please let me know if there is a fix when you 
get a chance.  Thanks.

HSSFWorkbook wb = new HSSFWorkbook();       
HSSFSheet s = wb.createSheet();        
HSSFRow r = null;
HSSFCell c = null;

HSSFCellStyle cs_amt = wb.createCellStyle();
HSSFFont f = wb.createFont();                        

Comment 13 Andy Oliver 2002-11-14 19:13:05 UTC
if you're going to create a style...and put nothing in it...for now make sure
you set all the colors to BLACK or AUTO... I'll bet we initialize it to
0...which is wrong...this is probably abug.
Comment 14 Avik Sengupta 2004-01-01 08:59:59 UTC
Actually, even a7-ab are reported to be percentage formats. So, its best to keep
the whole thing out. 
Comment 15 Avik Sengupta 2004-01-01 09:01:04 UTC
sorry, disregard previous comment! 
Comment 16 Jason Height 2005-08-23 05:07:16 UTC
Now seems to work with CVS HEAD. Test case used, also i created a cell and that
worked as well.