Skip to content

ExcelPython v2.0.5

Choose a tag to compare

@ericremoreynolds ericremoreynolds released this 01 Sep 09:14
· 43 commits to master since this release
  • Bug fix for Python 3.x: now using items instead of iteritems for iterating over dictionaries, as the latter is not supported in 3.x.

  • UDF arguments can be marshaled as "list" so that rather than arriving as tuples or tuples of tuples, they arrive as lists or lists of lists:

    # the function will return something like "[[1.0, 2.0], [3.0, 4.0]]"
    # depending on the input range.
    @xlfunc
    @xlarg("x", "list", dims=2)
    def list_function_2d(x):
        return str(x)
    
    # the function will return something like "[1.0, 2.0, 3.0]"
    # depending on the input range.
    @xlfunc
    @xlarg("x", "list", dims=1)
    def list_function_1d(x):
        return str(x)

    It is recommended to always use the dims argument to specify the dimensionality, as single-cell values will still be marshaled as scalars even if "list" is specified. Note that the implementation is not necessarily as efficient as it could be, it is provided just as convenient functionality.

  • Now using Application.PathSeparator to calculate paths in the add-in, even though it shouldn't make any difference on any machine, for now.

  • Fixed a bug on VBA7 (Excel 2010 on 64 bit systems) to do with missing PtrSafe keyword.