473,440 Members | 1,728 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,440 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 3369

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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.