简体   繁体   中英

Preserve excel format using jxl API

I am using JXL to copy from one excel sheet to another. When the data is getting copied to a new cell, it loses the actual formatting.

Eg. The large cells are converted to smaller ones in the new excel file.

Can someone please let me know if this is possible.

Regards

Bipul

You should copy not only cell, but it's format too.

   oldCellFormat = oldCell.getCellFormat();
   newCellFormat = new WritableCellFormat(oldCellFormat );
   newCell.setCellFormat(newCellFormat);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM