Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8123987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:20:00+00:00 2026-06-06T06:20:00+00:00

I have a spreadsheet of data I am parsing using openpyxl’s iter_rows function. However

  • 0

I have a spreadsheet of data I am parsing using openpyxl’s iter_rows function. However when I loop through the sheet using:

range_expr = "{col}{startrow}:{col}{endrow}".format(col='C',startrow=4,endrow=ws.get_highest_row()+1)

for row in ws.iter_rows(range_string=range_expr):
    print row
    if len(row) > 0:
        cell = row[0]
        if str(cell.value).isdigit():
            address.append(cell.value)
        else:
            continue
print address
raw_input("enter to continue")

the 3rd line just spews out empty parenthesis, which means the first if statement will always evaluate false, and no values will append to address. What I’m confused about is why print row does nothing, when there is data in the excel document. Thanks in advance everyone.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T06:20:01+00:00Added an answer on June 6, 2026 at 6:20 am

    I was overcomplicating things, and simplified it to this. Many thanks to notbad.jpg on the Python chat room:

    range_expr = 'C:C'
    
    for row in ws.iter_rows(row_offset=4):
        '''do things'''
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a spreadsheet, and the cells in the sheet have their data in
Like many, I have spreadsheet that draws data from over 40 text files as
Ok, so I have an excel spreadsheet that contains data that I would like
I have a spreadsheet I'm using to compile text that changes all the time.
I have a spreadsheet with 2 columns of data, column A and B, and
I have been using the Spreadsheet::ParseExcel to list the contents of spreadsheet. I've seen
Background I have a spreadsheet of data that I'm importing into SQL Server 2005.
currently I have a web which loads excel spreadsheet data into SQL database. When
I'm using OleDb to select data from excel spreadsheets. Each spreadsheet can contain many
I have one spreadsheet already saved with some data, then in a new spreadsheet

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.