0

I have a very specific task but unable to figure out how? If anyone who has done it before can share their thought that would be amazing.

I want to open an excel file using python on a Linux machine because I want to manipulate and analyze data in the excel file. I know that xlWings and few other packages can help me do that however what I am interested to know if I can do that same on a Linux machine using python e.g. EC2 instance of AWS.

I am not looking to open the excel file. If I am able to read and write on the sheets using a data frame that also works for me. Essentially that means I can work on an instance of Excel (or wings) object.

1
  • Yes it is posible. It is even easier with newer xlsx files which are essentially written in xml format and can be read and written using xml parser. Try out some codes and post new question here with code snippets, if you have any specific queries. Commented May 27, 2020 at 11:58

1 Answer 1

1

You can read the complete dataframe using pandas very easily and then iterate over multiple sheets.

You can read about it here

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

3 Comments

does that mean it is platform-independent and I don't have to have Excel installed to use pandas to read excel file?
yes its platform independent... just run pip install pandas to get pandas dependency in python on ec2
@ShubhamJain, I am trying to open an excel and give some input to a particular sheet, based on those inputs, a set of excel calculations will happen. In this case, I think I can't use pandas, right? I was trying the same using openpyxl, but it was also not successful. can you suggest any alternative way to do these calculations? Thanks in advance.!

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.