1

I am using Apache poi in my android application for generating excel. When i tried to use sheet.autoSizeColumn((short) 1) my application crashed with following errors.

Could not find class 'java.awt.font.TextLayout', referenced from method org.apache.poi.ss.util.SheetUtil.getCellWidth

Could not find class 'java.awt.font.TextLayout', referenced from method org.apache.poi.ss.util.SheetUtil.getColumnWidth Is there any method for using the sheet,autoSizeColumn or any alternative. Please help me thanks in advance.

4

2 回答 2

1

该包awt不包含在 Android 中,因此如果 Apache poi 使​​用它,您无法在 Android 中使用它。

于 2013-09-09T12:53:55.507 回答
0

替代方案是JWord。适用于 Android 且不使用 AWT。

于 2013-09-12T09:31:08.780 回答