Hello everyone,
I want use KNIME copy paste chart in excel from pic1 to pic2,and have 5 sheets need it, but I don’t know do it.
Please help me ,thank you.
pic1
pic2
Hello everyone,
I want use KNIME copy paste chart in excel from pic1 to pic2,and have 5 sheets need it, but I don’t know do it.
Please help me ,thank you.
pic1
pic2
Hello my master @takbb,
Could you help me for this post, no one has solved this problem yet.
Thank you in advance.
@Banksy maybe it would be best to explain what it is you want to do exactly and provide an example. What does it mean to ‘copy’ the chart. Do you want to refer to a different set of data and use the same chart? Do you want to do dynamic things?
What you can do is use OpenPyxl to place graphics on a sheet that you have created with Python.
I think what is possible is to provide an Excel file with a data sheet and a chart. Then you copy this file with KNIME to a new location and then fill the data sheet with new data.
Hi @mlauber71
I’m very sorry, maybe I didn’t express it clearly. I have two Excel files, and I need to copy the images from 5 sheets in one Excel file and paste them into the 5 sheets in another Excel file. None of the 5 images are dynamic data.
@Banksy it is possible to extract images from Excel files with the help of OpebPyxl which is already included in the KNIME python extension.
You can then use the other example to place the images in the other Excel file.
I assume you have several of these otherwise you would not need KNIME to do this. Could be a job for loops.
Maybe you can provide an example that would represent your task.
Hi @mlauber71
I don’t know how to use python, could you help me?
Sure, I can. Maybe you start with this article about the basics of KNIME and Python:
After you feel comfortable with that you can move on to using conda environments if you need special packages. But in KNIME often you will just have to have conda installed and then an Environment Propagation node will take care of the rest.
About the code. Modern LLMs or also the KNIME AI (K-AI) can help with that. Also, you can always ask in the forum. For example, if you provide a sample file people can try to help you.
@mlauber71
Thank you so much! I know how to use python nodes and install python packages, but I don’t write python code for this imported image.
@Banksy well the code is already there in the example. It will also create a list in Excel in the sub-folder storing the images from which excel file the image came and in which Excel sheet and address it was sitting and where the image is stored now.
Hi guys,
Maybe a suggestion. You can change information between 2 or more excel files if you maintain the same folders and name files, shareing chats. Just create at the original file the chart, copy and past to another excel file. It’ll create a data link from this chart and if you made some changes at the original file and update it, the second excel will be updated too when you click to refresh your data. Thats one of the powerfull processos between MS softwares, excel / powerpoint / word…
I know that it’s not a knime process, but if you are leading with MS products, it can help you.
Thanks, Denis
Hi @denisfi ,
Thank you very much for your reply, my request is to copy and paste images from multiple sheets in one Excel file to another Excel file, since it is multiple sheets, I would like to use KNIME to simplify this process.
Hi,@mlauber71
Due to the reasons related to my country, I am unable to download workflows from KNIME HUB. Could you please attach it to this post? I will try to see if I can download it. Thank you.
@Banksy Here is the workflow to extract images from Excel:
kn_example_python_excel_image_extract.knwf (714.7 KB)
Here is the workflow to place images inside Excel:
Excel - place PNG image on Sheet with OpenPyxl.knwf (346.8 KB)