Skip to content

Tag: openpyxl

Python openpyxl get date output format

i have an excel file that i cant change, where im getting some info with openpyxl, on this case i have a cell with this DATE format MM/DD/YYYY i need the output on python to be: %d/%m/%Y Ive tried this : I get this error : How can i make this work correctly? (im new in python and also on

How to write to new empty cell in openpyxl

I see there are a few similar questions already asked, but none seem to solve my problem. Also, some offer deprecated solutions such as using coordinate. The code I have works fine, but because I start the loop at a certain position, every time I re-run the code, it obviously starts writing from that one posi…

workbook save failing, not sure why

I apologize for the length of this. I am a relative Neophyte to Excel VBA and even more junior with Python. I have run into an issue with an error that occasionally occurs in python using OpenPyXl (just trying that for the first time). Background: I have a series of python scripts (12) running and querying an…

How can I write to specific Excel columns using openpyxl?

I’m writing a Python script that needs to write collections of data down specific columns in an Excel document. More specifically, I’m calling an API that returns a list of items. Each item in the list contains multiple fields of data (item name, item version, etc). I would like to iterate through…

How do I go about incrementally adding data using openpyxl?

I have a folder full of PDFs which I have parsed using Apache Tika, and I have a template excel file which I use to gather specific information from those PDFs and store using openpyxl. The issue I am having is looping through using openpyxl rows. For example, if there is just one PDF in folder, the values go…

Remove Automatic Page Breaks in Openpyxl

I am using openpyxl in Python to write to a worksheet. I need to add page breaks to specific rows. I am able to successfully add those row breaks using this block of code: However, I cannot seem to get rid of the automatic page breaks that Excel creates, leaving me with a bunch of unnecessary pages on my work…