Sala de Sinais

Automate Excel With Python – Python Excel Tutorial (OpenPyXL)

* O link para o vídeo completo está no final desse artigo.
Saiba mais clicando em Robô IQ OPTION de AUTOMATIZAÇÃO de Lista de SINAIS
E conheça também sobre o Melhor Bot Para Opções Binárias 2021
Que tal um robo gratuito para IQ Option? Sistema Para IQ Option Grátis

The first 1,000 people to click this link will get a free career coaching session courtesy of Career Karma:

Welcome to another video! In this video, I will cover how we can use python to automate Excel. I’ll be going over everything from creating workbooks to accessing individual cells and stylizing cells. There is a ton of things that you can do with Excel but I’ll just be covering the core/base things in OpenPyXl.

📄 Resources 📄
OpenPyXL Docs:
Code Written in This Tutorial:
Fix Pip (Windows):
Fix Pip (Mac/Linux):

⭐️ Timestamps ⭐️
00:00 | Introduction
02:14 | Installing openpyxl
03:19 | Testing Installation
04:25 | Loading an Existing Workbook
06:46 | Accessing Worksheets
07:37 | Accessing Cell Values
08:58 | Saving Workbooks
09:52 | Creating, Listing and Changing Sheets
11:50 | Creating a New Workbook
12:39 | Adding/Appending Rows
14:26 | Accessing Multiple Cells
20:46 | Merging Cells
22:27 | Inserting and Deleting Rows
23:35 | Inserting and Deleting Columns
24:48 | Copying and Moving Cells
26:06 | Practical Example, Formulas & Cell Styling

💰 Courses & Merch 💰
💻 The Fundamentals of Programming w/ Python:
👕 Merchandise:

🔗 Social Medias 🔗
📸 Instagram:
📱 Twitter:
⭐ Discord:
📝 LinkedIn:
🌎 Website:
📂 GitHub:
🔊 Podcast:

🎬 My YouTube Gear 🎬
🎥 Main Camera (EOS Canon 90D):
🎥 Secondary Camera (Panasonic Lumix G7):
📹 Main Lens (EFS 24mm f/2.8):
🕹 Tripod:
🎤 Main Microphone (Rode NT1):
🎤 Secondary Microphone (Synco Wireless Lapel System):
🎤 Third Microphone (Rode NTG4+):
☀️ Lights:
⌨ Keyboard (Daskeyboard 4Q):
🖱 Mouse (Logitech MX Master):
📸 Webcam (Logitech 1080p Pro):
📢 Speaker (Beats Pill):
🎧 Headphones (Bose Quiet Comfort 35):
🌞 Lamp (BenQ E-reading Lamp):
🌞 Secondary Lamp (BenQ Screenbar Plus):
💻 Monitor (BenQ EX2780Q):
💻 Monitor (LG Ultrawide 34WN750):
🎙 Mic Boom Arm (Rode PSA 1):
🎚 Audio Interface (Focusrite Scarlet 4i4):

💸 Donations 💸
💵 One-Time Donations:
💰 Patreon:

⭐️ Tags ⭐️
– Tech With Tim
– Python
– Excel
– Python Tutorial
– Python and Excel
– Automating Excel

⭐️ Hashtags ⭐️
#TechWithTim #PythonExcelTutorial


39 Comentários

  1. Hello, my MacBook flickers pink while installing pip3 flask.login for at least 2sec.
    The problem isn't there anymore but I have fear that my Mac have hard disk or software problems now. 
    Does anyone know about this problem. I would be very thankful

  2. you could use

    cell(row, column, value=None) method of openpyxl.worksheet.worksheet.Worksheet instance

    Returns a cell object based on the given coordinates.

    Usage: cell(row=15, column=1, value=5)

    Calling `cell` creates cells in memory when they

    are first accessed.

    :param row: row index of the cell (e.g. 4)

    :type row: int

    :param column: column index of the cell (e.g. 3)

    :type column: int

    :param value: value of the cell (e.g. 5)

    :type value: numeric or time or string or bool or none

    :rtype: openpyxl.cell.cell.Cell

    for itterating through a range of cells

  3. What is the difference between win32com and openpyxl? Which one should we use?

  4. Thank you Tim for the video. Its helpful for people like are in the process of picking up the rudiments of python. Could you do a video about OpenPyXL + Pandas. How these two work together and what are the pros and cons of using openpyxl and pandas on their own

  5. this video is super useless, there is no reason to prefer openpyxl over pandas (related to what you showed in this vid)

  6. Is there a way to edit MS Word documents in this manner as well?
    I have only been able to find limited information regarding Word processing with Python. Specifically, editing certain custom template elements in Word and saving the document to PDF afterwards through Python. I want to create an interface to edit only the necessary elements, save it to PDF and then do another document automatically without ever touching Word. Because opening a Word doc editing manually and saving to PDF takes a lot of time when you have to do it repeatedly.

  7. Hi!
    Thanks for the quality videos!

    Can I ask if you can follow up with integration with Pandas/ Numpy on a practical use case?
    Why can't we just use pandas to do all the required operations then write to a sheet?

  8. Can u make a python automation tutorial playliat with a few projects in it, I've been trying to script but it's kinda hard to get into as for different things we need different modules and the resources are kinda hard to find…

  9. Insert, like in excel, inserts above the row, not below. Note that A7 was moved down.

  10. And as I known, very high level programmers work in C++. If you wanna change something about your "cool" python, you have to go to execution and there you'll see C++. And won't understand what's written there.

  11. Yeah. Just don try to add page breaks.(rowbreaks) The damn shit doesn't work, it just corrupts the file.

  12. Thank you, Tim, for yet another great tutorial.
    I personally like to use the Python library xlwings whenever I am automating Excel tasks. Xlwings supports Numpy arrays and Pandas Series/DataFrames. It even offers a way to write User Defined Functions (UDFs) in Python [Windows only].

  13. it is nice if you know python and want to jump into excel.

    if your app/programm is going to be excel heavy… better use Visual Basic for Applications (VBA) … it is the integrated programming language of excel. and i think it is faster.

    python is as well mice if you work with excel-data, which is closed.
    (although i sont know if python opens the excel sheet and closes it again).

    nice video anyway

  14. I know how to manipulate files on C++ and let me tell you, it's ALOT shorter on Python.

Comentários estão fechados.