xloil
xloil copied to clipboard
xloil seems to break the Excel Offset method
Here's a simple py script demonstrating the issue I have with the Offset method:
@xlo.func(macro=True, command=True) def offset_activecell(): app = xlo.app() app.ActiveCell.Offset(0,0).Value = 'test'
I wasn't able to find the xloil method of getting the active cell, so I reverted to using the Excel.Application object to get to the ActiveCell method. I've tested that ActiveCell is working properly by reading the value in the active cell (not demo'd here). However when I try to use the Offset method as above, it seems to think the origin is one row above and one column to the left. It also will not accept negative numbers as arguments to Offset. It consistently performs this way if I move the active cell around the worksheet also.
Here's a screen shot showing where it is writing the 'test' string:
On another thought, just for my information, is there an xloil method to get the active cell?