You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2019/08/13 03:27:22 UTC
[Bug 63660] New: XSSFSheet.shiftRows() the cell value didn't ref to
new row in version 4.1.0
https://bz.apache.org/bugzilla/show_bug.cgi?id=63660
Bug ID: 63660
Summary: XSSFSheet.shiftRows() the cell value didn't ref to new
row in version 4.1.0
Product: POI
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: dev@poi.apache.org
Reporter: chaichunyang@gmail.com
Target Milestone: ---
i'd to use poi 4.1.0 generator a excel file with a List Data
and i get a wrong excel file when i use XSSFSheet.shiftRows(),my excel has some
contents as footer, so i need to shift the row down before insert a new row.
the question is when i shift the row down,the footer cell include the
mergedcell has shift down already,but the cell value didn't move,still in old
cell's position.
i found the nightly build【poi-bin-4.1.1-SNAPSHOT-20190807.tar.gz】may have
solved this problem.
So. When the version 4.1.1 will be release. This problem has a great impact on
me.
i use maven to build my project, can i fix this in other way?
thank you very much!
follow the code:
File file = new File("/Users/chaichunyang/Documents/test.xlsx");
Workbook workbook = WorkbookFactory.create(file);
Sheet sheet = workbook.getSheetAt(0);//already confirm this is a XSSFSheet
//shift the row down at 1
sheet.shiftRows(1, sheet.getLastRowNum(), 1);
//create new row at 1
Row newRow = sheet.createRow(1);
//create new cell
Cell newCell = newRow.createCell(0);
//...handle the List
newCell.setCellValue("newCell");
//out a new excel file
workbook.write(new FileOutputStream(new
File("/Users/chaichunyang/Documents/test_new.xlsx")));
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 63660] XSSFSheet.shiftRows() the cell value didn't ref to new
row in version 4.1.0
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63660
chaichunyang@gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEEDINFO |RESOLVED
--- Comment #2 from chaichunyang@gmail.com ---
Thanks, this has solved my problem. However, I found a new problem. When there
is content up and down the shifted row, I will get a corrupt xlsx file after
using shiftRows, which cannot be opened using Microsoft Office, but the file
can be displayed normally using LibreOffice.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 63660] XSSFSheet.shiftRows() the cell value didn't ref to new
row in version 4.1.0
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63660
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
Apache POI 4.1.1 is available now, can you state if this fixes your problem?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org