diff options
author | Tor Lillqvist <tml@collabora.com> | 2018-05-09 15:11:20 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2018-05-09 15:20:31 +0300 |
commit | 79fa6ac73caeae089d255c6b8629075364b4a477 (patch) | |
tree | 38760e3dbce536258ad9c738c292bc2c1c476006 /scripting/examples | |
parent | b6119095fa602ca62c16d4ea8ae301a031122941 (diff) |
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
Diffstat (limited to 'scripting/examples')
-rw-r--r-- | scripting/examples/python/NamedRanges.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |