How to Automate Excel with Python
In this video, I'm going to show you how to get started using Python with Excel.
We will cover how to:
* Install Python and all the relevant libraries
* Install the IDE(code editor)
* Run a script(3 different ways and it's important to understand each)
* Read and write Excel workbooks using Python
* How to trigger Python scripts from Excel events
#ExcelPython #xlWings
SUBSCRIBE TO THE CHANNEL: https://bit.ly/36hpTCY
DOWNLOAD THE SOURCE CODE FOR THIS VIDEO: https://bit.ly/2ZX6kRM
Related Training
The Excel VBA Handbook Course(https://TheExcelVBAHandbook.com)
Webinar Archives - 60+ Hours of VBA training(https://excelmacromastery.com/excel-vba-webinars)
Free Excel VBA Resources
Excel VBA Articles (https://excelmacromastery.com/vba-articles/)
Useful VBA Shortcut Keys
========================
Debugging:
Compile the code: Alt + D + C OR Alt + D + Enter
Run the code from the current sub: F5
Step into the code line by line: F8
Add a breakpoint to pause the code: F9(or click left margin)
Windows:
View the Immediate Window: Ctrl + G
View the Watch Window: Alt + V + H
View the Properties Window: F4
Switch between Excel and the VBA Editor: Alt + F11
View the Project Explorer Window: Ctrl + R
Writing Code:
Search keyword under cursor: Ctrl + F3
Search the word last searched for: F3
Auto complete word: Ctrl + Space
Get the definition of the item under the cursor: Shift + F2
Go to the last cursor position: Ctrl + Shift + F2
Get the current region on a worksheet: Ctrl + Shift + 8(or Ctrl + *)
To move lines of code to the right(Indent): Tab
To move lines of code to the left(Outdent): Shift + Tab
Delete a Line: Ctrl + Y(note: this clears the clipboard)
Table of Contents:
00:00 - Introduction
03:23 - Running Python code
08:05 - How to use OpenPyxl to read files
14:00 - How to use Pandas for data analysis
19:58 - How to use xlWings
24:43 - Installing the xlWings Addin
27:06 - Call Python from VBA
29:00 - Call VBA from Python
30:18 - Summary