Python Forum
opepyxl not counting rows in spreadsheets?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
opepyxl not counting rows in spreadsheets?
#4
Indeed, I misunderstood your question. I was under impression you clear content in cell A1. My bad, sorry.

Now, however, I tried to replicate your problem and was not able to do so. Using openpyxl 2.6.3. Openpyxl correctly detects max row number, regardless how A5 is deleted - select the cell and press Del, drag empty cell from row 6, delete the cell and move cells up, delete entire row, etc.

Are you sure you save the workbook after you delete the A5 cell/content? Make sure you don't have something in rest of the cells...
I doubt excel version will have any effect (i.e. openpyxl does not rely on MS Excel to read the file). different/older openpyxl may be the reason (if there was bug in a version before 2.6.3)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: opepyxl not counting rows in spreadsheets? - by buran - Mar-06-2020, 12:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Combining Spreadsheets Py3_14 4 656 Feb-07-2024, 04:58 PM
Last Post: deanhystad
  The code I have written removes the desired number of rows, but wrong rows Jdesi1983 0 1,653 Dec-08-2021, 04:42 AM
Last Post: Jdesi1983
  Merging spreadsheets with the same columns and extracting rows with matching entries johnbernard 3 10,767 Aug-19-2021, 03:08 PM
Last Post: johnbernard
  Pandas DataFrame combine rows by column value, where Date Rows are NULL rhat398 0 2,152 May-04-2021, 10:51 PM
Last Post: rhat398
  Indexing [::-1] to Reverse ALL 2D Array Rows, ALL 3D, 4D Array Columns & Rows Python Jeremy7 8 7,274 Mar-02-2021, 01:54 AM
Last Post: Jeremy7
Question How to make a 3D List of Excel Spreadsheets? chatguy 4 2,793 Jan-24-2021, 05:24 AM
Last Post: buran
  IDE with spreadsheets lewispgj 4 2,353 Mar-13-2020, 09:45 PM
Last Post: lewispgj

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020