In this tutorial, I will show you an overview of using OpenPyXL and Python to read and write Excel documents. You will also learn how to: Style cells Change fonts Create named styles Use pandas with Excel Combine pandas and OpenPyXL Basics of using XslxWriter The code in this tutorial is based on code from […]
My 10th Python book, Automating Excel with Python is now available on Amazon in Paperback or Kindle versions. In this book, you will learn how to use Python to do the following: Create Excel spreadsheets Read Excel spreadsheets Create different cell types Add and remove sheets Convert Excel spreadsheets into other file types Cell styling […]
Reading Excel spreadsheets is all well and good. However, you also need to be able to create or edit a spreadsheet. The focus of this chapter will be on learning how to do that! OpenPyXL lets you create Microsoft Excel spreadsheets with a minimum of fuss. Creating Excel spreadsheets using Python allows you to generate […]
There are a couple of fundamental actions that you will do with Microsoft Excel documents. One of the most basic is the act of reading data from an Excel file. You will be learning how to get data from your Excel spreadsheets. Editor's note: This article is based on a chapter from the book: Automating […]
Last month we looked at how to create Microsoft Excel (i.e. *.xls) files using the xlwt package. Today we will be looking at how we can read an *.xls/*.xlsx file using a package called xlrd. The xlrd package can be run on Linux and Mac as well as Windows. This is great when you need […]
Most typical users have used Microsoft Office. While Office may be the bane of tech support, we still have to deal with it. Python can be used to script (AKA automate) Office and make it easier for us or our users to use. It may not be as easy as recording a macro, but it's […]