Automate Excel Spreadsheet with Python

  Рет қаралды 57,514

Jie Jenn

Jie Jenn

Күн бұрын

Пікірлер: 42
@surat-dt9sr
@surat-dt9sr 3 жыл бұрын
thanks Jie, this simple to understand that it is possible modify data in excel with Pyton , no need VBA
@pacerthanyalak2251
@pacerthanyalak2251 3 жыл бұрын
Thank you for preparing the awesome video. This video is very easy to understand. I have the motivation to continue learning python.
@pimalanda7893
@pimalanda7893 3 жыл бұрын
Thank you thank you. Now I know how to use VBA Object modele in my Python code. I search this many years. I didnt think just to take from Microsoft doc. So simple.
@krasimirangelov8319
@krasimirangelov8319 2 жыл бұрын
Thank you. It has been of great help.
@jiejenn
@jiejenn 2 жыл бұрын
Glad the video helped.
@ComputerScienceSimplified
@ComputerScienceSimplified 3 жыл бұрын
Awesome video, keep up the amazing work! :)
@igormaricic7093
@igormaricic7093 2 жыл бұрын
thank you
@vectortonto1
@vectortonto1 2 жыл бұрын
You should add chapters to your video. Makes it more useful. Thanks
@krishna838
@krishna838 2 жыл бұрын
Hi Jie, Can you tell if pywin32 can help with the below use case? 1.I want to import Excel and read as Dataframe 2.Then do some Spacy based text analysis. I will also use other packages. 3.Finally store the results (scores) in New columns 4.Export the Excel
@jiejenn
@jiejenn 2 жыл бұрын
Pretty sure it is possible. Essentially you are just referencing Excel application in Python, it doesn't interpret other things you do.
@rayo2436
@rayo2436 Жыл бұрын
Nice, What is the difference with xlWings? which is better? Tranks!!!
@jiejenn
@jiejenn Жыл бұрын
xlwings is just a wrapper around pywin32 which offers a simpler usage to work some of the Excel models.
@rayo2436
@rayo2436 Жыл бұрын
@@jiejenn Thanks bro :)
@marvynrodriguez6844
@marvynrodriguez6844 3 жыл бұрын
Thanks for this video! Could you advise which would be the best way to copy data between different books? My main goal would be to create a database by getting data from various excel books in just one. Thanks in advance!
@jiejenn
@jiejenn 3 жыл бұрын
If you are just importing data from Excel files to a database, I would go with pandas.
@abdulaimohamed8281
@abdulaimohamed8281 2 жыл бұрын
Great video! How do I dynamically copy the range from A1 to E5 without specifying E5? like in VBA you could start from A1 and do xldown, xlright...
@jiejenn
@jiejenn 2 жыл бұрын
In Python, you would fetch the last row number as LastRow = wsEntry.Cells(wsEntry.Rows.Count, "A").End(-4162).row where -4162 represents xlUp numerate value. docs.microsoft.com/en-us/office/vba/api/excel.xldirection
@leonardrutaquio396
@leonardrutaquio396 3 жыл бұрын
can i also put formula and return the value instead of none?
@jiejenn
@jiejenn 3 жыл бұрын
Can you be more specific?
@zaferaslan912
@zaferaslan912 2 жыл бұрын
Thanks
@jiejenn
@jiejenn 2 жыл бұрын
Glad the video helped.
@rauldempaire5330
@rauldempaire5330 3 жыл бұрын
Could this work with LibreOffice Calc as well? Thank you for your reply...
@jiejenn
@jiejenn 3 жыл бұрын
I don't use LibreOffice, but looks like you can run Python script directly from the app. help.libreoffice.org/6.3/en-US/text/sbasic/python/main0000.html
@rauldempaire5330
@rauldempaire5330 3 жыл бұрын
@@jiejenn Merci beaucoup!
@TheNeilsolaris
@TheNeilsolaris 2 жыл бұрын
Will this work with Excel 2007, do you know? Thanks.
@jiejenn
@jiejenn 2 жыл бұрын
Because you are directly accessing Excel application, the method will work with Excel 2003 and later.
@mypalsdontcallme
@mypalsdontcallme 3 жыл бұрын
At work I have all these different excel spreadsheets I need scan through for information. I want to create a prompt that ask for the name of the user and scans through these excel spreadsheets n then shows me predetermined useful information I would need.. is this possible with python?
@tkprotich
@tkprotich 3 жыл бұрын
Yes
@wolesam2445
@wolesam2445 3 жыл бұрын
How can I open another worksheet.
@jiejenn
@jiejenn 3 жыл бұрын
use workbook.add to add a new worksheet.
@umakanthsahu8122
@umakanthsahu8122 3 жыл бұрын
How to bring it to foreground instead just opening in the background... Please Help....
@jiejenn
@jiejenn 3 жыл бұрын
wb.Activate
@umakanthsahu8122
@umakanthsahu8122 3 жыл бұрын
@@jiejenn Actually I'm using a Word Document so when I wrote word.Activate its giving error
@umakanthsahu8122
@umakanthsahu8122 3 жыл бұрын
@@jiejenn Here is my code... word = win32.Dispatch('Word.Application') print(type(word)) word.Visible = 1 print("opened") time.sleep(10) word.Quit() print("quitted") Can you help how to make it to foreground
@jiejenn
@jiejenn 3 жыл бұрын
You didn't even create the word document object. Word Application is not a Word file.
@umakanthsahu8122
@umakanthsahu8122 3 жыл бұрын
@@jiejenn yes sir it's enough if my word application opens in foreground but its not instead opening in background
@soniathomase7757
@soniathomase7757 2 жыл бұрын
Could you pls tell how do you add custom calculation on pivot table via win32com? i mean the usage of win32com.client.constants.xlPercentOfParentRow?
@jiejenn
@jiejenn 2 жыл бұрын
Your question is quite specific, it is difficult to explain in a few words. I would recommend you post your question on Stack Overflow for answers.
Automate Excel Pivot Table With Python
24:03
Jie Jenn
Рет қаралды 28 М.
Automate Excel Work with Python and Pandas
21:29
John Watson Rooney
Рет қаралды 101 М.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
Bust your kneecaps || Sun and X || MY AU
0:14
Striasol
Рет қаралды 554
How to Replace VBA with Python(Step-By-Step Tutorial)
31:19
Excel Macro Mastery
Рет қаралды 270 М.
How to Use SQL with Excel using Python
16:52
SATSifaction
Рет қаралды 123 М.
Automate Excel With Python - Python Excel Tutorial (OpenPyXL)
38:02
Tech With Tim
Рет қаралды 1,6 МЛН
Python Object Oriented Programming (OOP) - For Beginners
53:06
Tech With Tim
Рет қаралды 3,5 МЛН
Will Python Kill Excel VBA?
12:39
Excel Macro Mastery
Рет қаралды 341 М.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН