Grab Cell Ranges From Excel With Python - Python and Excel With OpenPyXL #7

Поделиться
HTML-код
  • Опубликовано: 23 янв 2025

Комментарии • 85

  • @Codemycom
    @Codemycom  3 года назад +3

    ▶️ Watch Entire OpenPyXL ✅ Subscribe To My RUclips Channel:
    bit.ly/2PVAsYW bit.ly/2IGzvOR
    ▶️ See More At: ✅ Join My Facebook Group:
    Codemy.com bit.ly/2GFmOBz
    ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt!
    Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN

  • @UnboxEverythingandAnything
    @UnboxEverythingandAnything 3 года назад +4

    Thanks John, this was the missing piece on something I was trying to do. In 3 minutes, you just solved my biggest issue.

  • @nkm7489
    @nkm7489 Год назад +7

    You don't have to loop twice to be able to .value the tuple output, you can simple use index values for this.
    for cell in range:
    print(cell[0].value)
    This will work and you won't have to loop twice, which can be a big performance upgrade when dealing with larger files

    • @captaincal6447
      @captaincal6447 5 месяцев назад

      I don't understand why he did not go this approach.

  • @sachinsinghal13
    @sachinsinghal13 3 года назад +1

    Hey John,
    Really great tutorials on openpyxl so far. Keep it up!!!

    • @Codemycom
      @Codemycom  3 года назад +1

      Thanks! Glad you like it!

  • @LVWattsPlays
    @LVWattsPlays Год назад +1

    How are we able to compile this program with pyinstaller to be executed elsewhere. I would like to be able to execute the file outside of gitbash. How is this possible?

    • @Codemycom
      @Codemycom  Год назад

      I don't have any videos on that

  • @Richkotite1
    @Richkotite1 3 года назад

    This is a fantastic video, showed me how to program a range of excel cells.

  • @rafadacunha9453
    @rafadacunha9453 Год назад +1

    Valeu!

  • @DarkSpeedKiller
    @DarkSpeedKiller 2 года назад

    is there a way to make the range we select as Page break view so its also printable?
    i can do that manually but i wanted to know if OpenPyXL could do it for me

  • @holycow4889
    @holycow4889 2 года назад

    Hey, I'm a little late with my question I guess 😅
    I have a excel file, which contains a link. In order to access the information(s) I am looking for, I have to first click that link. Any solution for that?
    -thanks

  • @sondrad1839
    @sondrad1839 2 года назад

    What if I want to grab the entire range on a sheet but I don’t know what that range is? For example I want to select the entire data range and then turn on autofilter for that sheet. Worksheet.autofilter()

  • @asmerbay8200
    @asmerbay8200 3 года назад +2

    Man so glad to see you doing this! Do you have any plan to make videos about pandas and data analysis?

    • @Codemycom
      @Codemycom  3 года назад +3

      Yeah, I have a couple in a playlist already...check the channel

    • @DimiEG
      @DimiEG 3 года назад

      Yes, this is very interesting theme even for me (pandas and data analysis).

  • @AbuAhmedAlsudani
    @AbuAhmedAlsudani 2 года назад

    Thanks for your tutorial, I ran into a problem when I was automating my excel file, I want to fill another column ( date column ) according to the previous column so that it is filled with a condition. How can I do that? Thanks in advance.

  • @nazuusyed6656
    @nazuusyed6656 2 года назад

    How to read cell value by using column name and row name?
    Example: First column in my excel is row names
    By using that row names amd columns names i want to get cell values..
    Can you help me?

  • @setsototitipana8433
    @setsototitipana8433 Год назад

    Great content, beautiful work. I just have a couple of questions, how can you edit the excel file, that is, add/remove content, say: a word, number or formula. and how can you access other spreadsheets? and, would it be possible to view a formula saved in excel file, say you have a cell that performs some mathematical operation using other cells within the workbook, would you be able to see it from python using openpyxl? and lastly would you be able to use multiple workbooks at the same time, that is, you have a workbook that contains first names and colors like in the example and another workbook containing another information, age and last names for example?

  • @teacherron5571
    @teacherron5571 6 месяцев назад

    Is it possible to save it in another new excel file? How? thanks.

    • @Codemycom
      @Codemycom  6 месяцев назад

      Sure, the course shows how to create and save excel files

  • @daniellizarraga7993
    @daniellizarraga7993 3 года назад

    Can this whole series of python and excel with openpyxl be used in a tkinter program to edit specific excel cells?

  • @Bittinikkari
    @Bittinikkari 3 года назад

    Hello John
    I have combobox for excel databank, and it has 300 rows, and 10 columns.
    How do i do if i select one object from combobox list, and it gets data from B column.
    Like i choose A10 text from combobox, it gets data from B10.
    And i need to use that B10 data to calculate things.
    I have not able to find tutorial for this.
    Thank you, your videos has been so helpful to this point.
    -Hannu

  • @airsheepfpv1708
    @airsheepfpv1708 2 года назад +1

    Hi John, Excellent tutorials! Question: If the range is variable from time to time is there a way to get that instead of manually entering 'A1': 'AXX' every time. Can it grab the number of cells like in len() ? Thanks

  • @rohitkumarrai4050
    @rohitkumarrai4050 3 года назад

    Love to see more in this series ☺️

    • @Codemycom
      @Codemycom  3 года назад

      They're available for purchase at codemy.com I won't be posting any more free here

  • @williamtimothy5302
    @williamtimothy5302 2 года назад +1

    Hi John - thanks for the great content. If I had one request, it would be how to work with Groupings in openpyxl. Specifically, how to extract certain Groupings of data from an .xlsx file. Context: looking to write Groupings from a Workbook into separate Worksheets. Would love to hear if you have a video covering this and/or any recommended resources?

  • @WeAreFamily2803
    @WeAreFamily2803 Месяц назад

    This helped me a lot!!

  • @lorddamian1982
    @lorddamian1982 3 года назад

    What if I have a variable range?

  • @PumpkinIssues
    @PumpkinIssues 3 года назад

    I'd love more of these
    like more complex subjects

    • @Codemycom
      @Codemycom  3 года назад +1

      You can purchase them from Codemy.com

  • @blacksheep924
    @blacksheep924 3 года назад

    very helpful we need more of this

    • @Codemycom
      @Codemycom  3 года назад

      I've got the entire course for sale on codemy.com

  • @DimiEG
    @DimiEG 3 года назад

    Are you going continue this playlist?

    • @Codemycom
      @Codemycom  3 года назад

      No, to continue to watch it you need to purchase it from Codemy.com

  • @speedraven
    @speedraven 3 года назад

    Hi! Let's say I want to print a random value from range 'A1' to 'A10'. Is there any way to do that/is there a series on your channel where you teach about this exact thing? Thanks in advance!

    • @Codemycom
      @Codemycom  3 года назад

      You could just use python's random function to randomly select your value, then just get the data from the spreadsheet in the normal way I show in these videos

  • @exnavydavid
    @exnavydavid 2 года назад

    Hi John - thanks for the great explanations... I'm a bit confused though, you mentioned what you'd be talking about in the next video, but this series ended with #7 and I can't find the next in this series. There are a ton of videos, and maybe I'm just overlooking it, but I don't see the continuation... can you help me out?

    • @Codemycom
      @Codemycom  2 года назад

      The course continues at codemy.com but you have to purchase it.

  • @capincrunch1184
    @capincrunch1184 3 года назад

    Thank you these videos are amazing!

    • @Codemycom
      @Codemycom  3 года назад +1

      Glad you like them!

  • @wilburforce1366
    @wilburforce1366 3 года назад

    From the land of Aussie - When will OpenPyXL #8 coming out?

    • @Codemycom
      @Codemycom  3 года назад

      Never, you have to purchase it from Codemy.com

  • @codeKeshav
    @codeKeshav 3 года назад

    Is everything got ok

  • @yahyaa4499
    @yahyaa4499 3 года назад

    hi sir, hope you are fine...
    What about the kivy and django tutorials...i am new to the channel,just wanted to know if the courses on kivy and django are still going on..

    • @Codemycom
      @Codemycom  3 года назад

      Yes, I’ve been out of town with a family emergency. They’ll start back up next week.

  • @capincrunch1184
    @capincrunch1184 3 года назад

    I broke my code because I tried writing to excel and it writes values as text into excel and excel just give me errors

  • @joaobarbosa5724
    @joaobarbosa5724 3 года назад

    the double for loop to get the values of a range of cells is something that should not be a thing in openpyxl. Why is it not possible to get the values directly from something like ws['A2':'A10'].value ?

    • @manasbaligar8882
      @manasbaligar8882 2 года назад

      Because it will be in tuple format and tuple has no attribute value

  • @carlosdanielvilaseca8217
    @carlosdanielvilaseca8217 2 года назад

    is not finished? :'(

  • @pcdreams1
    @pcdreams1 2 года назад

    what I'd like to see is using python like you use filters. if this cell value is x return the entire row. I know this can be done. I've seen it in pandas, but still haven't gotten my head around it

  • @kuldeep7063
    @kuldeep7063 2 года назад

    👌👌👌👍👍Thank you so much

  • @VinodKRamachandra
    @VinodKRamachandra 3 года назад

    Incredible tutorials, John. Quick question. Is it possible to pass workbook/worksheet as an argument to a function? Somehow im unable to do so.

    • @Codemycom
      @Codemycom  3 года назад

      Sure, I don't see why not...

  • @ComputerScienceSimplified
    @ComputerScienceSimplified 3 года назад

    Awesome video, keep up the incredible work! :)

  • @adzplus1
    @adzplus1 2 года назад

    Where is the next video?

    • @Codemycom
      @Codemycom  2 года назад

      You have to purchase it on codemy.com

  • @abdulaimohamed8281
    @abdulaimohamed8281 2 года назад

    Great videos John!
    How do I dynamically select a range and pasteSpecial - make its values equal to itself
    import openpyxl
    wb=openpyxl.load_workbook(path1)
    sheet = wb['Sheet1']
    names=sheet['A']
    for cellObj in names:
    val = str(cellObj.value)
    if val[0] == "=":
    #print(val)
    excel.Range(dynamic range).Select() #PART I WANT TO SELECT IF TRUE
    excel.Selection.PasteSpecial(Paste=-4163)
    THANKS!!

  • @rajuj8876
    @rajuj8876 2 года назад

    One live value in Excel cell is running with python
    Copy it in other cell every 15 seconds
    Help me sir

    • @Codemycom
      @Codemycom  2 года назад

      Sorry I don't know what you mean.

  • @davidkline2788
    @davidkline2788 3 года назад

    really enjoying these! Where is video 8+

    • @Codemycom
      @Codemycom  3 года назад

      You have to purchase it on Codemy.com

  • @raviraushan3613
    @raviraushan3613 2 года назад

    Awesome Man

  • @mrj6967
    @mrj6967 3 года назад +1

    why didnt you keep this playlist up? its so useful for people with finance and accounting background like me! I recommend you u to not lose this type of audience that has a lot to do with excel! im just saying

    • @Codemycom
      @Codemycom  3 года назад

      Because this is a paid course at codemy.com If you want the rest of the videos in the course, you have to purchase them.

  • @lorddamian1982
    @lorddamian1982 3 года назад

    Excelent video

  • @zapboyz
    @zapboyz 2 года назад

    thank you teacher

  • @vaibhavbhasin1221
    @vaibhavbhasin1221 Год назад

    output is coming as None

    • @Codemycom
      @Codemycom  Год назад

      What did you do differently from the video?

  • @alicherifi9075
    @alicherifi9075 3 года назад

    Thank you!

  • @tathyadixit8864
    @tathyadixit8864 3 года назад

    Please make a scrapy tutorial series on this channel

    • @Codemycom
      @Codemycom  3 года назад

      Sorry, I don't know what that is

    • @tathyadixit8864
      @tathyadixit8864 3 года назад

      *web scrapping

    • @sachinsinghal13
      @sachinsinghal13 3 года назад +2

      What I see about 80% of the time in comments is that people ungratefully keep saying "John, make this tutorial", "John, can you teach this", "John, do you know this" and are just not grateful and thankful and appreciative for his youtube channel and many amazing and helpful tutorials on different things, how much more to expect from him!? This is unlike what I mention in the comments

    • @tathyadixit8864
      @tathyadixit8864 3 года назад +2

      @@sachinsinghal13 bro it is your problem if you think so.
      Why anybody will ask him to make any tutorial series that is already uploaded on RUclips. This is just because he explains things very well