Guest User

Untitled

a guest
Mar 22nd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. // Get source cell type and style
  2. CellType type_from = cell_from.getCellTypeEnum();
  3. CellStyle style_from = cell_from.getCellStyle();
  4.  
  5. // Get source cell data format
  6. short df = style_from.getDataFormat();
  7.  
  8. // Change dest cell cell type, set format on it
  9. cell_to.setCellType(type_from);
  10. CellStyle style_to = cell_to.getCellStyle();
  11. style_to.setDataFormat(df);
  12. cell_to.setCellStyle(style_to);
Add Comment
Please, Sign In to add comment