Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Get source cell type and style
- CellType type_from = cell_from.getCellTypeEnum();
- CellStyle style_from = cell_from.getCellStyle();
- // Get source cell data format
- short df = style_from.getDataFormat();
- // Change dest cell cell type, set format on it
- cell_to.setCellType(type_from);
- CellStyle style_to = cell_to.getCellStyle();
- style_to.setDataFormat(df);
- cell_to.setCellStyle(style_to);
Add Comment
Please, Sign In to add comment