1

I've been looking for ages to find a suitable module to interact with excel, which needs to do the following:

  1. Check a column of cells for an "incorrect" value and change it

  2. Check for empty cells, and if so, replace it

  3. Check a cell value is consistent with the contents of another cell(for example, if called Datasheet, the code in another cell = DS)and if not, change it.

I've looked at openpxyl but I am running Python 3 and I can only seem to find it working for 2.

I've seen a few others but they seem to be mainly focusing creating a new spreadsheet and simple writing/reading.

1
  • 1
    openpyxl definitely works with Python 3. But if your system has both versions of Python installed (which can easily happen without your realizing it) it is possible that openpyxl is only installed in your Python 2 environment. Commented May 16, 2019 at 12:10

1 Answer 1

1

The Pandas library is amazing to work with excel files. It can read excel files easily and you then have access to a lot of tools. You can do all the operations you mentionned above. You can also save your result in the excel format

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.