0

I've written a Python script that takes input files and outputs a CSV file. Next, I go into Excel and use conditional formatting to color some of the information (e.g. if A2=1, color background red) -- to keep the formatting I save it as *.xlsx (not sure this is a good idea, currently only tested in windows). This needs to be performed multiple times.

In short: I'd like to incorporate the second stage into the script and this needs to work both in windows and linux.

My thoughts: record an excel macro, have python open csv files and run that macro, then (save as...?) close file or keep it open (optional with command flag -k, --keep_open).

My search came up inconclusive looking for a solution applicable for both OS environments.

This looked close, but it seems windows-centric.

Thoughts/suggestions would be appreciated.

askedAug 3, 2013 at 13:21
ofer.sheffer's user avatar

1 Answer1

4

You would almost certainly be better off adding your formatting and doing other operations in python then saving as an Excel xml file.

Since AFAIK Excel is only available for Windows and Mac you are going to be out of luck trying anything like this on Linux. Why not do something similar for Open Office or Libra Office? There is alsopySpread which will really whet your appetite.

answeredAug 3, 2013 at 13:48
Steve Barnes's user avatar
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Sign up orlog in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

By clicking “Post Your Answer”, you agree to ourterms of service and acknowledge you have read ourprivacy 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.