You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Yuta Ogai <og...@em.t-kougei.ac.jp> on 2014/09/10 04:55:27 UTC
SimpleShape on ChartSheet
Hello,
I would like to put SimpleShape on ChartSheet.
I tried source as shown below, but it made an empty chart sheet.
Is it unsupported yet?
Utils.openWorkbook is to open a file, and Utils.saveWorkbook is to
save a workbook.
ChartSheet.xlsx have only one empty chart sheet.
---------------------------------------------------------------
Workbook workbook = Utils.openWorkbook("ChartSheet.xlsx");
XSSFChartSheet sheet = (XSSFChartSheet)workbook.getSheetAt(0);
XSSFDrawing drawing = (XSSFDrawing) sheet.createDrawingPatriarch();
XSSFClientAnchor anchor = drawing.createAnchor(0, 0,
XSSFShape.EMU_PER_PIXEL*100, XSSFShape.EMU_PER_PIXEL*100, 0, 0, 0, 0);
XSSFSimpleShape shape = drawing.createSimpleShape(anchor);
shape.setFillColor(0x00, 0xff, 0xff);
Utils.saveWorkbook(workbook, "new.xlsx");
---------------------------------------------------------------
--
OGAI Yuta
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org