Sunny
Sunny

Reputation: 1076

Excel Generation in android using Apache poi

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.

Upvotes: 1

Views: 485

Answers (2)

Sami
Sami

Reputation: 1

Alternative is JWord. Works on Android and does not use AWT.

Upvotes: 0

Budius
Budius

Reputation: 39836

the package awt is not included in Android, so if Apache poi uses it, you can't use it in Android.

Upvotes: 1

Related Questions