user3262424
user3262424

Reputation: 7479

Include Python Code In Excel?

I'd like to be able to include python code snippets in Excel (ideally, in a nice format -- all colors/formats should be kept the same).

What would be the best way to go about it?

EDIT: I just want to store python code in an Excel spreadsheet for an easy overview -- I am not going to run it -- just want it to be nicely visible/formatted as part of an Excel worksheet.

Upvotes: 2

Views: 533

Answers (2)

jsbueno
jsbueno

Reputation: 110476

While Excel itself doesnot support other scripting Langauges than VBA, the open source OpenOffice and LibreOffice packages - which include a spreadsheet - can be scriptable with Python. Still, they won't allow Python code to be pasted on teh cells out of the box - but it is possible to write Python code which can act on the spredsheet contents (and do all the other things Python can do).

Upvotes: 1

Eric Wilson
Eric Wilson

Reputation: 59385

I think that gist (from github) is precisely what you are looking for. From the description:

Gist is a simple way to share snippets and pastes with others. All gists are git repositories, so they are automatically versioned, forkable and usable as a git repository.

Upvotes: 2

Related Questions