Dear all
i want to create a script to export diagram as picture format in an excel file.
I have used the information in this topic
Using additional libraries : Ansys medini analyze Support (freshdesk.com)
but it don't work.
I have added somme jar file in .lib and I don't have issue for this
var urls = [
new java.net.URL("file:///" + __filedir + "/.lib/commons-io-2.15.1.jar"),
new java.net.URL("file:///" + __filedir + "/.lib/ee.minimum-1.1.3.jar"),
new java.net.URL("file:///" + __filedir + "/.lib/excel-1.3.5.jar")
];
var Guava = new java.net.URLClassLoader(urls);
and for
var inputStream = new java.io.FileInputStream(picture1);
after i have found a javascript in internet to import picture in excel but i don't know how to translate in Medini
// read picture with stream
InputStream inputStream = new FileInputStream(picture1);
byte[] bytes = IOUtils.toByteArray(inputStream);
//add picture in workbook , wb
int pictureIdx = wb.addPicture(bytes, Workbook.PICTURE_TYPE_JPEG);
//close stream
inputStream.close();
thank you for your help
Best regards
Philippe