POI setting Cell Background to a Custom Color

You get this error because pallete is full. What you need to do is override preset color. Here is an example of function I’m using: public HSSFColor setColor(HSSFWorkbook workbook, byte r,byte g, byte b){ HSSFPalette palette = workbook.getCustomPalette(); HSSFColor hssfColor = null; try { hssfColor= palette.findColor(r, g, b); if (hssfColor == null ){ palette.setColorAtIndex(HSSFColor.LAVENDER.index, r, … Read more

Excel: the Incredible Shrinking and Expanding Controls [closed]

The problem seems to relate to the way Windows handles non-native resolutions on monitors and can be avoided in several ways The problem can be a complete nightmare when it happens, but it only happens intermittently. We have been testing recently an excel worksheet used by a few dozen people and have developed a good … Read more

Get User Selected Range

Selection is its own object within VBA. It functions much like a Range object. Selection and Range do not share all the same properties and methods, though, so for ease of use it might make sense just to create a range and set it equal to the Selection, then you can deal with it programmatically … Read more