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.

2 Answers 2

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

is there any alternative for the same?
Not that I'm aware of. But I never tried editing Office docs in Android, so there might be.
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.