[prev in list] [next in list] [prev in thread] [next in thread]
List: poi-dev
Subject: DO NOT REPLY [Bug 47188] setCellComment corrupts workbook (2007 XML
From: bugzilla () apache ! org
Date: 2010-01-24 14:00:37
Message-ID: 20100124140037.534BD234C4AA () brutus ! apache ! org
[Download RAW message or body]
https://issues.apache.org/bugzilla/show_bug.cgi?id=47188
Yegor Kozlov <yegor@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #8 from Yegor Kozlov <yegor@dinom.ru> 2010-01-24 06:00:33 UTC ---
Rajeev,
I can't reproduce the problem with the current trunk. The following code
snippet works fine and produces readable output:
public static void main(String[] args) throws Exception {
Workbook wb = new XSSFWorkbook();
Sheet sh = wb.createSheet();
int i = 0;
Cell cell = sh.createRow(0).createCell(i);
CreationHelper ch = wb.getCreationHelper();
Drawing drawing = sh.createDrawingPatriarch();
ClientAnchor anchor = ch.createClientAnchor();
anchor.setCol1(6+i);
anchor.setRow1(4+i);
anchor.setCol2(12+i);
anchor.setRow2(13+i);
anchor.setDx1(i*4);
anchor.setDy1(i*4);
anchor.setDx2(i*4);
anchor.setDy2(i*4);
Comment comment = drawing.createCellComment(anchor);
comment.setString(ch.createRichTextString("Testing 47188"));
comment.setColumn(i);
comment.setRow(0);
cell.setCellComment(comment);
FileOutputStream out = new FileOutputStream("/temp/47188.xlsx");
wb.write(out);
out.close();
}
Try the latest build from trunk. Nightly builds can be downloaded from
http://encore.torchbox.com/poi-svn-build/.
If the problem persists, please attach full sample code to reproduce, ideally a
junit test case.
Yegor
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic