Intro
Microsoft Excel and Google Sheets are the two most popular and widely used spreadsheet software today. Google Sheets emphasizes on the seamless collaboration on the web while Excel provides great performance and analytics features on people’s desktop.
Since both platforms – Excel and Google Sheets – offer different benefits (although they do share many similar functionalities), sometimes you may want to take your Google Sheets, convert them to Excel so you can take advantages of Excel’s powerful analytics engine. In Google Sheets, if you want to convert the file to Excel, you can take the following 5 steps
Go to File > Download as > and choose Microsoft Excel > select the folder where you want to download the Excel file > Save the file.
Although a very simple five steps instruction, it does take some manual work and approximately 20 seconds for the conversion. Imaging one day you decided to leave Google for whatever the reason might be, and you want to backup all your Google Sheets as Excel files.
Let’s just say you have 100 Google Sheets you want to convert to Excel, each conversion takes 20 seconds.
20 seconds x 100 Google Sheets File = 2,000 seconds = 33 minutes. (I hope my calculation is correct).
The obstacle
After doing some Google search and see what options are out there, what I found was if you want to do a mass Google Sheets to Excel conversion, you either have to pay a 3rd party service which costs hundreds of dollars and may not work well or just manually download each Google Sheets file one-by-one.
For me, that’s not ideal. Thankfully, Google Drive API and Python come to the rescue.
Solution
In this tutorial, I will walk you through how to create a Python program to perform mass Google Sheets to Excel file conversions, so you don’t have to spend the money to purchase a 3rd party service or manually doing the work on your own.
Before we begin, you will need to have a Google Cloud Console account and have the Google Drive and Google Sheets API services enabled first.