timxx / pywpsrpc

Python bindings for WPS Office RPC (for Linux)
MIT License
219 stars 44 forks source link

可以使用Shapes相关的接口吗 #61

Closed 12893822294 closed 1 year ago

12893822294 commented 1 year ago

我需要获取文本框和图片,但是在使用Shapes相关的方法时,出错了

shapes = WorkSheet.Shapes

我用遍历 1、for i in WorkSheet.Shapes 2、Worksheet.Shapes[1] 3、Worksheet.Shapes(1) 4、Worksheet.Shapes.Item 我用这四种方法都没用, 用dir都打印出来,也找不到任何可调用的方法

timxx commented 1 year ago

可以参考https://github.com/timxx/pywpsrpc/blob/master/tests/test_rpcetapi.py#LL122C15-L122C15 这里的例子

suqi95716aa commented 1 year ago

可以参考https://github.com/timxx/pywpsrpc/blob/master/tests/test_rpcetapi.py#LL122C15-L122C15 这里的例子

你好,我遇到了一样的问题,希望通过Shapes接口调用AddPicture()方法,但是返回错误AttributeError: 'Shapes' object has no attribute 'AddPicture', 通过dir()打印它的属性和方法发现并没有任何可调用的方法,都是内置的魔法方法,根据你给出的例子操作也是一样的情况

timxx commented 1 year ago

可以参考https://github.com/timxx/pywpsrpc/blob/master/tests/test_rpcetapi.py#LL122C15-L122C15 这里的例子

你好,我遇到了一样的问题,希望通过Shapes接口调用AddPicture()方法,但是返回错误AttributeError: 'Shapes' object has no attribute 'AddPicture',通过dir()打印它的属性和方法发现并没有任何可调用的方法,都是内置的魔法方法,根据你给出的例子操作也是一样的情况

请更新版本