Excel crashes after append - openpyxl

I am using openpyxl to automatically append data. My excel file has picture widgets(Text box) like shown below (highlighted). But the picture widgets are deleted after append. Also, I get the error: "Removed Feature: Named range from /xl/workbook.xml part (Workbook)", "Removed Part: /xl/drawings/drawing3.xml part. (Drawing shape)". Can anyone please let me know how to resolve this.
Thanks in advance!

Openpyxl can't read images directly (documentation: https://openpyxl.readthedocs.io/en/default/usage.html). There are some types of image it won't save at all.
Warning:
openpyxl does currently not read all possible items in an Excel file so images and charts will be lost from existing files if they are opened and saved with the same name.
However, there are some nice solutions on this old post, even though openpyxl functionality has changed since then. Particularly, installing Pillow via pip may help you: Images dissapear in excel documents when copying them with python
The alternative is to use libraries other than openpyxl. I have previously had cause to use openpyxl for some functions, and then stitch final image-containing documents together with win32com on Windows, for example.

Related

Batch plotting dwg & dxf files to pdf in AutoCAD

I have a problem with making the batch plotting files in the autoCAD.
The similar query is here, but it solves an issue within 1 file only.
Convert dwg file to pdf
In turn, the main tutorial doesn't explain it enough.
https://knowledge.autodesk.com/support/autocad/learn-explore/caas/sfdcarticles/sfdcarticles/How-to-publish-multiple-drawings-into-PDF-in-AutoCAD.html
I have the problem with creating the batch list itself.
My problem looks like this.
I have got a command "Layout not initialized", as per below:
As a result I have got nothing.
Is anyone able to help?
One of the solutions is running the command PAGESETUP and setting the page layout for each document, as follows:
https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/layout-not-initialized-when-publish.html

pdf table to excel in Automation anywhere

I am trying to get PDF tables in excel for further processing in Automation anywhere.I tried it like converting PDF to text and then to excel but it not working as required.
Please suggest if anyone did this.
Thanks all who replied and tried to help.
But, i got the solution as there is bot already for this in botstore of AA and we can use it.
We can use this metabot and logic to perform action.
PFB link for the same:
https://botstore.automationanywhere.com/bot/pdf-to-excel/
I think you can use OCR inbuild tool or PDF read tools and take those data items into the variables. And then try to use keystrokes (or other) to add those variables as text in textfile. As well as add those items to the excel sheet. try it.

Error When Importing PDF into Word

I need to perform multiple edits in a word document and based on search criteria then import the relevant PDF for that specific page. The file path I dynamically create as per specific data on the various pages. The code works fine if there are less that roughly 70 PDF files to import.
Once it gets to importing after around 70 PDF files then Word starts to give warning about not being able to undo the action which is about to be performed, even though i clear the Undo History after I have imported each PDF.
Then there is also an error which comes up with regards to the importing of the PDF, see image below:
But I can still open PDF document when this error occurs, if I stop my code and try to manually import the PDF it doesnt work. Only if I save the word document and then reopen it, can I import PDF documents into the word document again.
I believe it has something to do with all the actions being performed in Word.
Unfortunately I am not able to create a demo code which will give the same outputs for this question.
Why would PDF documents give an error when importing into Word?

Extracting combobox display data from fdf file using iText

I need to read the fdf file to get the list options (via getListOptionDisplay) for a combo box, but when I invoke the getAcroFields method on the fdfReader, the fields come back as empty. I'm using an older version (2.1.2), any suggestions or code samples?
Figured it out. I couldnt use the inherited methods, but I reviewed the fdfReader object in the debugger and was able to extract the information.

Sample Coreldraw projects do not get Imported

I have downloaded some sample corelDraw projects from different resources, which has sizes in the range of 1-10 MB, but, when i open them using corel menu's "File open" option it give me error "Either it is not importable using selected filter or this format is not supported" I tried alternatives ways to open these files but failure!
Please note that
These are the files with cdr extensions.
They got sizes in MB's whose range is mentioned above
How can I make these files usable!
Thanks!
You can try to import them File --> Import,
Or maybe your Corel Version is lower then project files