i am using apache poi library to create a workbook, in the sheet i want to add border to my whole content table , there is option available to create border for a single cell, is there any way so that i can apply the border to whole sheet content
Asked
Active
Viewed 1,027 times
1 Answers
0
Use this default method, just create a HSSFCellStyle and save that object, then in the loop whenever you are writing the excel, just use this style object directly passed to the method setDefaultColumnStyle(),, method doc tells you..
public void setDefaultColumnStyle(int column,CellStyle style) Sets the default column style for a given column. POI will only apply this style to new cells added to the sheet.
Specified by: setDefaultColumnStyle in interface Sheet
Parameters: column - the column index style - the style to set
Just let me know if its working for you?

KDjava
- 2,355
- 4
- 17
- 22