[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - scripting/examples
Tor Lillqvist
tml at collabora.com
Wed May 9 15:57:58 UTC 2018
scripting/examples/python/NamedRanges.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 849fb9927b85752787e34039a6e243eb5e399c02
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed May 9 15:11:20 2018 +0300
Use the . separator between sheet name and cell range instead of ! to match UI
Also put a dollar in front of the sheet name.
Change-Id: I93d610dad8ad085718b0fe389e460b588939e5d2
(cherry picked from commit 79fa6ac73caeae089d255c6b8629075364b4a477)
Reviewed-on: https://gerrit.libreoffice.org/54035
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/scripting/examples/python/NamedRanges.py b/scripting/examples/python/NamedRanges.py
index b699f286fc26..34307ae8440c 100644
--- a/scripting/examples/python/NamedRanges.py
+++ b/scripting/examples/python/NamedRanges.py
@@ -37,7 +37,7 @@ def DefineNamedRange(sheet, x0, y0, width, height, name):
# FIXME: Is there some Python-callable API to turn a row and column into an A1 string?
# This obviously works only for the first 26 columns.
abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- content = sheet +"!" + "$" + abc[x0 : x0+1] + "$" + str(y0+1) + ":" + "$" + abc[x0+width-1 : x0+width] + "$" + str(y0+height)
+ content = "$" + sheet + "." + "$" + abc[x0 : x0+1] + "$" + str(y0+1) + ":" + "$" + abc[x0+width-1 : x0+width] + "$" + str(y0+height)
position = uno.createUnoStruct('com.sun.star.table.CellAddress')
position.Sheet = 0
position.Column = 0
More information about the Libreoffice-commits
mailing list