## Python/Excel for engineers

## Python/Excel for engineers

(OP)

I have recently been experimenting with Python + numpy and scipy; combined with PyXll to talk to Excel. It seems to me to be a good way of getting round Excel's main limitation for engineering work (i.e. the lack of good heavy-duty numerical analysis routines), although the need to work in a new language slows things down at first.

Anyone else using Python for engineering work?

Any recommended engineering applications or good documentation/help resources would be much appreciated.

Anyone else using Python for engineering work?

Any recommended engineering applications or good documentation/help resources would be much appreciated.

Doug Jenkins

Interactive Design Services

http://newtonexcelbach.wordpress.com/

## RE: Python/Excel for engineers

While not directly related to Excel, I found the following two websites useful general resources:

http://wiki.scipy.org/NumPy_for_Matlab_Users

http://matplotlib.org/users/navigation_toolbar.htm...

## RE: Python/Excel for engineers

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers

## RE: Python/Excel for engineers

I write most of my matlab stuff in octave compatible code anyway, so of the two alternatives I am more likely to stick with octave. That being said it wouldn't kill me to get a working py environment up and running, as we already have large slabs of the GUI for my main programs written in py.

Cheers

Greg Locock

New here? Try reading these, they might help FAQ731-376: Eng-Tips.com Forum Policies http://eng-tips.com/market.cfm?

## RE: Python/Excel for engineers

My main reasons for going with Python rather than Octave were:

- It seems to be much easier to integrate with Excel (with the help of PyXll).

- The Strand7 API has interfaces for Matlab and Python, but not Octave. Trying to convert from Matlab to a partial clone, in a language I know nothing about, seemed like asking for trouble.

- Python is (it seems) more flexible, and probably has a bigger developer community.

Doug Jenkins

Interactive Design Services

http://newtonexcelbach.wordpress.com/

## RE: Python/Excel for engineers

So I ask, what advantages does Python have over my old favs Fortran and Excel VBA?

## RE: Python/Excel for engineers

This IDE is useful: http://www.jetbrains.com/pycharm/

"Simplicity is the ultimate sophistication." L. da Vinci

G. Coppola

## RE: Python/Excel for engineers

I have done some stuff linking Excel to Fortran via VBA, and it worked well, but it doesn't seem to work since I moved to 64 bit Windows. It would probably be fairly simple to fix, but I haven't found the time to look at it.

The main advantages of Python are:

- There are extensive libraries linking to high performance compiled code, and these seem to be under more active development than Fortran.
- Using PyXll it's very easy to call these libraries, either directly from a User Defined Function, or via VBA.
- It is also very easy to develop routines in VBA, then link to compiled routines, via PyXll and Python, for the calculation intensive bits.

The main disadvantage compared with linking Excel directly to a compiled language is that pure Python seems to be even slower than VBA, although there are easy to use ways to speed it up, which from my limited testing seem to work very well.I guess the main reason for adopting Python, other than that I enjoy dabbling with this stuff, is that I see it as a way of future-proofing for the days when VBA and/or Excel become just another programming tool that old people used to use once.

Doug Jenkins

Interactive Design Services

http://newtonexcelbach.wordpress.com/

## RE: Python/Excel for engineers

http://newtonexcelbach.wordpress.com/2013/09/24/py...

Doug Jenkins

Interactive Design Services

http://newtonexcelbach.wordpress.com/

## RE: Python/Excel for engineers

But, I have used it many times before for statistical calculations.

Since reading this thread I tried to use if for scientific things I would normally use Matlab or Maple, Octave for.

But, the scientific libraries for Mac OSX are a serious pain to install. With a net search this seems to be a widespread issue.

If anyone here uses Python for engineering on OSX let me know. Thanks.

"Simplicity is the ultimate sophistication." L. da Vinci

G. Coppola

## RE: Python/Excel for engineers

"Simplicity is the ultimate sophistication." L. da Vinci

G. Coppola

## RE: Python/Excel for engineers

It is very useful and similar to Octave. It although has a better interface imo than Octve.

http://www.scilab.org/

"Simplicity is the ultimate sophistication." L. da Vinci

- Gian

## RE: Python/Excel for engineers

Cheers

Greg Locock

New here? Try reading these, they might help FAQ731-376: Eng-Tips.com Forum Policies http://eng-tips.com/market.cfm?

## RE: Python/Excel for engineers

"Simplicity is the ultimate sophistication." L. da Vinci

- Gian

## RE: Python/Excel for engineers

http://help.scilab.org/docs/5.3.3/en_US/mfile2sci....

"Simplicity is the ultimate sophistication." L. da Vinci

- Gian

## RE: Python/Excel for engineers

It converted:

## CODE -->

to

## CODE -->

Also, seems that Matlab runs the code same faster. Interesting.

"Simplicity is the ultimate sophistication." L. da Vinci

- Gian

## RE: Python/Excel for engineers

- Steve

## RE: Python/Excel for engineers

Although, the direct programming of scripts seems to be almost on par with matlab in terms of functionality.

"Simplicity is the ultimate sophistication." L. da Vinci

- Gian