I'm trying to put status flag pictures into XLS cells, and have it kind of working. But there's a problem. On certain columns, I have the cell wrapping attribute set. So on the rows where there's enough text in those cells to actually wrap, my pictures get stretched to the cell height.
I'm using anchor type 2 (move with cell, but don't resize), but that's not enough. The anchor 'coordinates' are based on starting and ending cell ranges with optional offsets within the cells to 'fine tune' the positioning and sizing. But this all counts on knowing upfront how big the cells are. I know the column widths, but since I'm counting on Excel to dynamically figure out the height based on the need for wrapping cells on the row, I'm assuming all rows are the same height. Big mistake. Excel's nice enough to not stretch the picture when I resize the cell manually, but when *it* resizes the cell automatically to wrap text, it doesn't respect the 'don't resize' aspect of the anchor type. Of course if I manually resize the cell height after opening the spreadsheet the first time, Excel leaves the image heights alone. But that's no help. I could probably set the row height explicitly, but I think that would prevent Excel from automatically wrapping text. It looks like a catch-22. Anybody know of a way to get POI to force a specific height on an image you insert into a cell? Thanks, Rob -- View this message in context: http://www.nabble.com/Ouch---pictures-%2B-wrapping-%3D-stretched-pictures-tp20964770p20964770.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
