I have a excel file with pictures of curves in it. Now I like to export these curves in Knime from the Excel file to a directory. I could not find a way on the internet.
With a VB script this is possible, but like to do this in Knime, because I also use Knime for the rest of the data handling.
This is an Excelfile with the pictures. It is not about the colored dots in column D,E or F, but the graphs in column N.
so the charts are stored somewhere as images or can be exportet directly to Knime rather than via Excel… that would be an easier task I assume…
check in NodePit for Image Reader Node, and image to table…
I noticed that @gab1one has a nice workflow here that almost works for your use case:
The problem is that the library underlying the Image Reader (Table) node doesn’t support Windows EMF files, which is the format your images are in. Now if you all you care about is moving the image files around on your file system without reading them into KNIME, this might be OK - you would just need to update the workflow to copy the EMF images into another (non-temporary) directory on your system. Otherwise, if you need to bring the images into KNIME itself… maybe Gabriel has another suggestion?
thanks for this response. This would solve the problem if it is possible in Knime to save the xls file as a htm file.Then the dir will be created with all the png files.
Otherwise I still need Excel to open the xls file and save it as a htm file. In that case I also can directly export the pictures from Excel.
If I use option2 then the pictures are saved in the EMF format. But need them in the PNG format. Is there a way in KNIME to reformat EMF fles to a PNG format?
I like to do the whole workflow in KNIME instead of Excel
I looked into this a little more. As best I can tell, there isn’t a way to have KNIME duplicate Excel’s functionality when saving an XLSX file as an HTM file. So option 1 is out.
Using option 2, I needed a way to convert EMF to PNG. But the usual nodes we would use to do this in KNIME don’t support EMF. So, I came up with a very hacky workaround. It’s uglier than I would like, but it seems to work.
I downloaded the free, open-source tool ImageMagick for Windows - other OS options are available - since I wanted something that would batch convert images from the command line. I then updated @gab1one 's previous workflow to use the External Tool node, which calls ImageMagick within a loop to convert the files. I had to wrap this node inside some Try/Catch logic, which you can see inside the metanode.
If you are willing to install one small additional program, this should work for you. You might have to make some minor adjustments within the External Tool node to the input, output, and executable file paths.
I am still not able to test your proposed workflow because i still don’t have permission to install the
open-source tool [ImageMagick for Windows ]
But when I’am able to install it, I will test your workflow