OpenOffice pyno“全选”
有谁知道如何使用 OO uno 桥接 api 在 Calc 工作表中“选择全部”?
或者,找到最大使用的行数和列数也可以。
我想要做的是将格式应用于电子表格中的所有单元格。
(原因是我将工作表保存为 csv,因此除非格式提供足够的小数位,否则数字不会准确保存。)
Does anyone know how to use the OO uno bridge api to "select all" in a Calc sheet?
Alternatively, finding the maximum used row and column number would work.
What I want to do is apply a format to all the cells in the spreadsheet.
(The reason being that I'm saving the sheet as csv, so numbers are not accurately saved unless the format provides enough decimal places.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
假设您已连接到 OpenOffice,并且
document
是已打开或创建的电子表格。Assuming you have already connected to OpenOffice and
document
is a spreadsheet that has been opened or created.我确实收到以下行的错误(属性错误):
通过组合两个信息
1:http://nab.pcug.org.au/transferdemo_oocalc.py
和 2:https://wiki.openoffice.org/wiki/Documentation/BASIC_Guide/Cells_and_Ranges
我提出了以下解决方案:
然后您可以像这样访问代码中的这些值:
并创建一个范围
或其他内容以进行进一步的工作。
I do get an error (Attribute Error) with the line:
By combining the two information at
1: http://nab.pcug.org.au/transferdemo_oocalc.py
and 2: https://wiki.openoffice.org/wiki/Documentation/BASIC_Guide/Cells_and_Ranges
I came up with the following solution:
you may then access those values in your code like this:
and create a range
or whatever for further work.