Код: Выделить всё
String picturePath = "/storage/emulated/0/Pictures/MyImages/Signature_1582216915190.jpg";
File iconFile = new File(picturePath);
InputStream inputStream = new FileInputStream(iconFile);
CreationHelper helper = workbook.getCreationHelper();
Drawing drawing = sheetTAF.createDrawingPatriarch();
ClientAnchor anchor = helper.createClientAnchor();
anchor.setAnchorType(ClientAnchor.MOVE_AND_RESIZE);
int pictureIndex = workbook.addPicture(IOUtils.toByteArray(inputStream), Workbook.PICTURE_TYPE_PNG);
anchor.setCol1(0);
anchor.setRow1(56); // same row is okay
anchor.setRow2(56);
anchor.setCol2(1);
Picture pict = drawing.createPicture(anchor, pictureIndex);
pict.resize();
Может ли кто-нибудь помочь, как я могу добавить изображение в книгу Excel, или может помочь с исправлением приведенного выше снимка? Заранее спасибо
Подробнее здесь: https://stackoverflow.com/questions/603 ... ok-android
Мобильная версия