I've got an excel document and i need to take an image of the first sheet and use it to put in the icon of JLabel. How can I do it?
Asked
Active
Viewed 1,318 times
0
-
I'm trying to use workbook.getPictureDate but it doesn't exist – marcss Feb 08 '16 at 08:23
-
1Do you want to get an image that is in first sheet or create a thumbnail from first sheet? – andrucz Feb 08 '16 at 13:06
1 Answers
2
I don't think Apache POI provides anything here as it is not concerned about displaying the data, only about retrieving and updating the data in the Excel Workbook.
So basically only Excel and other office applications like LibreOffice know how to actually display the data.
A few alternative options that come to my mind:
- Use some other software to display the contents as a web-page and use Selenium to take a screenshot, see e.g. Take a screenshot with Selenium WebDriver
- Programmatically open the file in Excel on a Windows box, then use some screenshot utility with automation support