Read & Write Excel Files Using Python || Openpyxl Tutorial

  Рет қаралды 23,162

Coders Arcade

Coders Arcade

Күн бұрын

Пікірлер: 26
@Basavaraja_NT
@Basavaraja_NT 4 ай бұрын
Finally found a KZbin guy from Bangalore -Whitefield🤩
@arnavdayal7189
@arnavdayal7189 2 жыл бұрын
Thanks a lot ...finally able to use it after struggling for a day
@CodersArcade
@CodersArcade 2 жыл бұрын
Happy to help. Please like share and subscribe. 😊❤️👍
@li249
@li249 8 ай бұрын
Very clear! Thanks a lot! New user friendly!
@CodersArcade
@CodersArcade 8 ай бұрын
Welcome. Happy to help 😊
@Hakeem357
@Hakeem357 5 ай бұрын
Very helpful. Thank you very much.
@CodersArcade
@CodersArcade 5 ай бұрын
Welcome 🤗
@ranjansanyal
@ranjansanyal 4 ай бұрын
Darun dada 👌
@CodersArcade
@CodersArcade 4 ай бұрын
Jay Jagannath
@CodersArcade
@CodersArcade 4 ай бұрын
Jay Jagannath
@eskailash
@eskailash Жыл бұрын
Thank you..
@ilhamhamut469
@ilhamhamut469 2 жыл бұрын
Danke schön sir❤️
@bigbiker2112
@bigbiker2112 Жыл бұрын
Very usefull!! Thanks
@CodersArcade
@CodersArcade Жыл бұрын
Welcome 😊
@rajeshpaul4052
@rajeshpaul4052 7 ай бұрын
thanks! , is there difference b/w import openpyxl and from openpyxl import workbook
@CodersArcade
@CodersArcade 7 ай бұрын
Good question. All your doubts will be cleared once you go through this video where everything about importing modules into your program has been beautifully explained. Please have a look : kzbin.info/www/bejne/p3bMoXukrbCib9Esi=lOM1qNNTIvE2BoTi
@antonyjdurai740
@antonyjdurai740 2 жыл бұрын
Very useful..
@vasanthkumarkallannavar7594
@vasanthkumarkallannavar7594 6 ай бұрын
Code that read xl file and save the plotted charts to device ?any one please
@CodersArcade
@CodersArcade 6 ай бұрын
Robot Framework is primarily designed for acceptance testing and robotic process automation, and it may not be the best tool for creating charts and saving them. However, you can achieve this by combining Robot Framework with external libraries for reading Excel files and creating charts. One way to do this is by using Python as a scripting language along with the `openpyxl` library for Excel operations and `matplotlib` for plotting charts. Below is an example of how you can achieve this: 1. First, make sure you have Python, Robot Framework, `openpyxl`, and `matplotlib` installed. You can install them using: ```bash pip install robotframework openpyxl matplotlib ``` 2. Create a Robot Framework test script (e.g., `chart_test.robot`) with the following content: ```robot *** Settings *** Library Process Library String Library OperatingSystem *** Test Cases *** Generate and Save Chart ${excel_file} Create Excel File example.xlsx Create Data For Chart ${excel_file} Create Chart ${excel_file} Save Chart ${excel_file} output_chart.png *** Keywords *** Create Excel File [Arguments] ${file_name} Open Excel ${file_name} Set Sheet Value Sheet1 A1 X Set Sheet Value Sheet1 B1 Y Set Sheet Value Sheet1 A2 1 Set Sheet Value Sheet1 B2 2 Set Sheet Value Sheet1 A3 2 Set Sheet Value Sheet1 B3 4 Set Sheet Value Sheet1 A4 3 Set Sheet Value Sheet1 B4 6 Save Excel ${file_name} Create Data For Chart [Arguments] ${file_name} Open Excel ${file_name} ${data} Read Excel Range Sheet1 A1:B4 Log ${data} Save Excel ${file_name} Create Chart [Arguments] ${file_name} Open Excel ${file_name} Create Chart Sheet1 Line X-axis Y-axis Save Excel ${file_name} Save Chart [Arguments] ${file_name} ${output_file} Run Keyword And Ignore Error Create Folder output Run Keyword And Ignore Error Remove File output/${output_file} Run Process python -c "import matplotlib.pyplot as plt; plt.plot([1,2,3,4], [2,4,6,8]); plt.savefig('output/${output_file}')" ``` This example assumes that you want to create a simple line chart based on the data in the Excel file. Adjust the `Create Data For Chart` and `Create Chart` keywords based on your actual data and chart requirements. 3. Run the Robot Framework test: ```bash robot chart_test.robot ``` This script will create an Excel file, populate it with data, generate a chart, and save the chart as `output_chart.png` in the `output` folder. Adjust the file names and chart settings according to your specific requirements.
@msinzamam413
@msinzamam413 2 жыл бұрын
How to get data/value from a excel table... Pls do a video on that.....
@CodersArcade
@CodersArcade 2 жыл бұрын
Will surely try to upload a video on the same. Thanks for the suggestion 😊
@CodersArcade
@CodersArcade 2 жыл бұрын
just a small update we made this video already and now you can see that video by clicking on this link : kzbin.info/www/bejne/joa8eKuvabqGbbM
@nikhildeshpande1247
@nikhildeshpande1247 Жыл бұрын
My spreadsheet contains formula??I want to retain those formula
@CodersArcade
@CodersArcade Жыл бұрын
Can you please elaborate what you want to do. Are you reading data ? Or want to write data ?
@rightchoice5501
@rightchoice5501 Жыл бұрын
Hi Wen i do in teritory pip install openpyxl it shows command wrong ❌
@CodersArcade
@CodersArcade Жыл бұрын
There's nothing wrong with the command here. Please restart your system and the IDE or try to restart your command prompt and terminal and check the installation again. It should work fine.
Hands-on Python Openpyxl Project
1:02:30
Python Bits
Рет қаралды 23 М.
How to Replace VBA with Python(Step-By-Step Tutorial)
31:19
Excel Macro Mastery
Рет қаралды 261 М.
Electric Flying Bird with Hanging Wire Automatic for Ceiling Parrot
00:15
Blue Food VS Red Food Emoji Mukbang
00:33
MOOMOO STUDIO [무무 스튜디오]
Рет қаралды 35 МЛН
I Took a LUNCHBAR OFF A Poster 🤯 #shorts
00:17
Wian
Рет қаралды 16 МЛН
Introducing Python in Excel
19:01
Leila Gharani
Рет қаралды 1,5 МЛН
Introduction to OpenpyXL Library [ Python and Microsoft Excel ]
34:09
Using Excel .xlsx files with Python! OpenPyXl Tutorial
7:23
LeMaster Tech
Рет қаралды 68 М.
YOU WILL NEVER PERFORM VLOOKUP AGAIN.. WATCH TILL END…
22:28
Python Bits
Рет қаралды 21 М.
Modern Graphical User Interfaces in Python
11:12
NeuralNine
Рет қаралды 1,5 МЛН
Electric Flying Bird with Hanging Wire Automatic for Ceiling Parrot
00:15