You can use sheet.addMergedRegion(rowFrom,rowTo,colFrom,colTo);
example sheet.addMergedRegion(new CellRangeAddress(1,1,1,4));
will merge from B2 to E2. Remember it is zero based indexing (ex. POI version 3.12).
for detail refer BusyDeveloper’s Guide
More Related Contents:
- How can I read numeric strings in Excel cells as string (not numbers)?
- Best language to parse extremely large Excel 2007 files [closed]
- How to read Excel cell having Date with Apache POI?
- Embed files into Excel using Apache POI
- Apache POI – FileInputStream works, File object fails (NullPointerException)
- Apache POI add a Series name into LineChart
- Apache poi Excel line chart points
- How to set axis’ labels in a Line Chart using Apache Poi
- Removing a row from an Excel sheet with Apache POI HSSF
- Apache POI autoSizeColumn Resizes Incorrectly
- What is the better API to Reading Excel sheets in java – JXL or Apache POI [closed]
- How to read data from XLS (Excel) file [Java, Android]
- Password Protected Excel File
- how to read exact cell content of excel file in apache POI
- Create Bar Chart in Excel with Apache POI
- Excel Cell Style issue
- How to insert a row between two rows in an existing excel with HSSF (Apache POI)
- Exception when writing to the xlsx document several times using apache poi 3.7
- Apache-POI sorting rows in excel
- Java POI : How to read Excel cell value and not the formula computing it?
- Create a password protected Excel file using Apache POI?
- Apache POI evaluate formula
- Embed files into XSSF sheets in Excel, using Apache POI
- Apache POI Line Chart colors
- Java POI the supplied data appears to be in the Office 2007+ XML
- Determine MS Excel file type with Apache POI
- Make column read-only using apache poi
- Why my program crash when i press back Button
- How do I set cell value to Date and apply default Excel date format?
- Importing ant build.xml in Eclipse