Category Archives: VBA

Passing variable argument lists from Excel to Python via xlwings

When calling a Python function it is sometimes necessary to pass a variable number of arguments.  Examples from the xlw_Scipy spreadsheet include: Curve fitting functions, for which the functions to be fitted may have any number of arguments. The Scipy … Continue reading

Posted in Arrays, Excel, Link to Python, NumPy and SciPy, UDFs, VBA, xlwings | Tagged , , , , , , , , | Leave a comment

Returning Arrays From VBA and Python

Most  of the  user defined functions (UDFs) presented on this blog return a multi-cell array, that must be entered by selecting the output range then pressing Ctrl-shift-enter to display all the results.  This process has several inconveniencies: You need to know … Continue reading

Posted in Arrays, Excel, Link to Python, UDFs, VBA, xlwings | Tagged , , , , , , , | Leave a comment

More Numpy with Excel and xlwings

The spreadsheet presented in the last post on sorting also includes links to many other Numpy functions.  The spreadsheet and associated Python file can be downloaded from: xlNumpy.zip The Numpy functions require xlwings and Numpy to be installed, which are included in … Continue reading

Posted in Arrays, Excel, Link to Python, Maths, Newton, NumPy and SciPy, UDFs, VBA, xlwings | Tagged , , , , , , , , , , | 1 Comment

Sorting with Python and Numpy

Following the previous post, lets look at sorting functions in the Numpy library. The spreadsheet xlwNumpy links to a variety of Numpy functions, including the sorting functions described below.  The spreadsheet and associated Python code can be downloaded from: xlNumpy.zip … Continue reading

Posted in Arrays, Excel, Link to Python, NumPy and SciPy, UDFs, VBA, xlwings | Tagged , , , , , , , | 1 Comment

Sorting with VBA and Python

This subject was last covered in March 2014.  I have now updated the Python code to work with xlwings, and the new version (including open source VBA and Python code) can be downloaded from: Sortfunc.zip. The previous version, linking to … Continue reading

Posted in Arrays, Excel, Link to Python, UDFs, VBA, xlwings | Tagged , , , , , | 1 Comment

IP2_py Update for Python3

The spreadsheet IP2_py provides a large number of geometric functions, including intersection points of lines, circles and planes, interpolation, rotations, and converting between coordinate systems.  Many of the functions are available in VBA and Python versions.  The Python code has now … Continue reading

Posted in Coordinate Geometry, Excel, Link to Python, Maths, Newton, NumPy and SciPy, UDFs, VBA, xlwings | Tagged , , , , , , , , , , | Leave a comment

Beam geometric non-linear effects

A quick and convenient way to allow for the effect of deformations on the behaviour of beams and columns under axial load is to adjust the beam stiffness matrix, so that the calculated deflections are in equilibrium with the applied … Continue reading

Posted in Beam Bending, Excel, Finite Element Analysis, Frame Analysis, Newton, UDFs, VBA | Tagged , , , , , , | 2 Comments