Python Forum
Manipulating an Excel Workbook
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Manipulating an Excel Workbook
#1
Hello! I currently have an excel spreadsheet that is showing me data but I need to be able to manipulate that data, find exceptions, and suggest corrections. From what I can tell, I am not sure I can do it in excel itself. My question is, can I write a code in python that will interact with that spreadsheet in the way I need it to? I used to have a basic understanding of python but have since gotten rusty. Is it worth re-learning python to be able to manipulate my spreadsheet? Any suggestions or help is appreciated! Thank you!
Reply
#2
Certainly you can do this with python with an excel package, probably pandas
but I expect it might be easier to figure out how to do what you want with excel formulas.
a real example would be helpful.
Reply
#3
Here is what I need to do...
I have 3 columns representing recitals. Each student has a row that populates those three columns. If they have one class in recital 1, there is a 1 in the column. If they have 2, its a 2. It populates for each recital. So if they have one class in each recital, there will be a 1 in every recital column. What I need is for a program to find and show all students who have classes in more that one recital. Once that is found, if there is a way for it to suggest potential fixes so that all there classes are in one recital that would be amazing. The difficult thing is that there are close to 300 students. Is it possible that a python code could do this. Or does it make more sense to go about it a different way? Thank you!
Reply
#4
Quote:Stanimal:
Is it possible that a python code could do this.

from my previous post:
Quote:Larz60:
Certainly you can do this with python with an excel package, probably pandas
It should be quite easy, do you know any python?

see: https://python-forum.io/Thread-A-List-of...n+tutorial

recommended:
python tutorial either of:
http://openbookproject.net/thinkcs/python/english3e/
https://www.python-course.eu/python3_course.php

pandas tutorial: https://www.learnpython.org/en/Pandas_Basics

Python tutorials:
Reply
#5
I can't really say that I know any python any more. Thank you very much for the link to the tutorials!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to copy work sheet data one workbook to other? sayyedkamran 2 646 Nov-03-2023, 09:10 AM
Last Post: Larz60+
  xlwings error when reading a workbook Mishal0488 1 1,043 Aug-01-2023, 02:05 AM
Last Post: deanhystad
  Help in opening and editing an excel workbook from a web-browser test 4 1,374 Aug-10-2022, 02:31 PM
Last Post: test
  Add a new column when I extract each sheet in an Excel workbook as a new csv file shantanu97 0 2,192 Mar-24-2021, 04:56 AM
Last Post: shantanu97
  [split] openpyxl workbook module not callable yosoyebj 1 2,739 Sep-14-2020, 10:18 AM
Last Post: buran
  Facing issue while saving workbook Abhisht 3 5,507 Aug-19-2020, 11:44 AM
Last Post: Larz60+
  Manipulating data from a CSV EvanS1 5 2,679 Jun-12-2020, 05:59 PM
Last Post: perfringo
  Saving Excel workbook file with dataframe names Biplab1985 0 1,996 Jun-07-2020, 12:25 PM
Last Post: Biplab1985
  manipulating two lists rancans 8 3,122 Apr-16-2020, 06:00 PM
Last Post: deanhystad
  Need to identify sheet color in excel workbook chewy1418 2 2,448 Feb-14-2020, 03:26 PM
Last Post: chewy1418

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020