473,386 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Need hep to loop through excel

aboka
1
hi, im new to python and would like to learn howto loop through the excel(A2, B2, A3, B3....) and read its field value so i could send it to a function. the code below works fine, but it only reads the first row. thanks in advance.

Expand|Select|Wrap|Line Numbers
  1. wb = openpyxl.load_workbook(r'C:\Users\user\Desktop\blaster\sms.xlsx')
  2. sheet = wb.active
  3.  
  4. x1 = sheet['A1'].value #phone number
  5. x2 = sheet['B1'].value #text message
  6.  
  7. object.sendmsg(x1, x2)
Jan 23 '23 #1
0 3367

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: spidrw | last post by:
I have a system that lets users input service events (much like appointments at a Dr.'s office). Oftentimes a particular person will have 30 or 31 appointments in a month, as all events are...
1
by: elbatz | last post by:
Hello.Does anyone here know how to convert or export data from excel to access database having an existing table using visual basic 6 codes? And if that data in excel already exist in access...
2
by: ManuelValdez | last post by:
Hello! I need your help to design an Excel macro to delete zeros only in selected cells. Thank you very much.
3
by: ManuelValdez | last post by:
Hello everybody! I need your valuable help to get an Excel macro to delete the single zeros only and no the zeros containing numbers like 360, 90, etc., because if I chose the search and replace...
3
by: JDubP | last post by:
I know a bit about VBA in Excel, but not about looping records in Access 2003, so any help will be appreciated. I think if someone can send me some sample code, I can muddle my way through. (or if...
0
by: arunbalait | last post by:
Hi Sorry I dont know where to post this question. Apologize if this is a wrong section I need a macro for finding duplicate entries in Excel. There are lost of Duplicate entries in various...
0
by: JRough | last post by:
Hi, I have a page with a form that is included into a php page. It has some php variables which are headers based on the user choices. In the form I will send some mysql data columns but right...
5
by: ElPresidente | last post by:
Now that I have your attention haha... I have this weekly file that contains several hundred invoices that need to be given batch letters in according to the following hierarchy. Employee...
3
by: lavsaxena | last post by:
I am using excel as database for my project. We are getting following error while making database connection, install_driver(Excel) failed: Can't locate loadable object for module Clone in @ INC...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.