Hello,

I am trying to read values from an excel spreadsheet but just for specific cells at a time; say Cell A1 and B1.
Then I want to save the respective values into a variable and use the variable through out the rest of the code.
Then loop at the end of the code to go to the next row/line; say A2 and B2 and do the same thing.

I don't want to read the entire spread sheet at once. Please provide examples of what you might be trying to describe. Thanks

Download and install module xlrd (pip install xlrd) and type xlrd in this forum's search box.

Edited 4 Years Ago by Gribouillis

While I know that you said you don't want to read the full excel file, I feel compelled to point out that if you're reading in a high volume of data, pulling in individual cells is going to slow your program to an absolute crawl.

Is there a reason you can't take the entire active range and then perform operations on the resulting array, then push your results back (if they're going back to the spreadsheet at all)?

This question has already been answered. Start a new discussion instead.