Openpyxl "Numbers Stored as Text"

Viewed 14093

Background:

  • Using Pycharm w/ Openpyxl
  • I work a lot in Excel and have been trying to automate some small daily tasks using python to increase my understanding of the language

Situation:

  • I am trying to modify an existing xlsx spreadsheet, and have been able to successfully change formatting like column width, zoom, etc.
  • However, I am really struggling with the dreaded "Numbers stored as text" scenario. There is a specific range of columns (Z:AZ) that always contain numbers, but they are stored as text by default.

Question:

  • Has anyone had experience converting text to numbers within an existing worksheet?

I've done some extensive searching on StackOverflow as well as many other sites and can't seem to find a solution that will work for me.

Any insight would be greatly appreciated!

1 Answers
Related