473,288 Members | 1,743 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,288 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 3365

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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.