Lines Matching refs:sh
66 def cellrange(sh, addr): argument
67 return sh.getCellRangeByName(addr)
99 sh = doc.Sheets.getByIndex(0)
101 sh.getCellByPosition(1, i - 1).Value = i
104 c = sh.getCellByPosition(0, i)
178 def fill_table(sh, rows=12): argument
181 sh.getCellByPosition(c, 0).String = h
185 sh.getCellByPosition(0, r).String = regions[r % 4]
186 sh.getCellByPosition(1, r).String = prods[r % 3]
187 sh.getCellByPosition(2, r).Value = r * 3 % 17
188 sh.getCellByPosition(3, r).Value = 1.25 * r
189 sh.getCellByPosition(4, r).Value = 43831 + r
190 return sh
327 def pivot_source(doc, sh, rows=40): argument
330 sh.getCellByPosition(c, 0).String = h
342 sh.getCellByPosition(0, r).String = regions[r % 4]
343 sh.getCellByPosition(1, r).String = prods[r % 3]
344 sh.getCellByPosition(2, r).Value = (r * 7) % 23
345 sh.getCellByPosition(3, r).Value = 1.25 * r
346 c = sh.getCellByPosition(4, r)
349 c = sh.getCellByPosition(5, r)
352 return rng_addr(sh.RangeAddress.Sheet, 0, 0, 5, rows - 1)
356 sh = doc.Sheets.getByName(sheetname)
357 dps = sh.DataPilotTables
367 dps.insertNewByName(name, cell_addr(sh.RangeAddress.Sheet, at[0], at[1]), desc)
502 sh = doc.Sheets.getByName("Filtered")
503 dps = sh.DataPilotTables
580 sh = doc.Sheets.getByIndex(0)
584 sh.getCellByPosition(c, r).Value = r * 10 + c
585 sh.getCellByPosition(4, r).Formula = "=SUM(A%d:D%d)" % (r + 1, r + 1)
590 step(name + ":" + label, fn, doc, sh)
596 def a(doc, sh): argument
597 sh.getCellByPosition(0, 0).Value = 111
598 sh.getCellByPosition(0, 0).Value = 112
599 sh.getCellByPosition(1, 0).String = "text"
600 sh.getCellByPosition(5, 5).Formula = "=A1+1"
601 sh.getCellByPosition(5, 5).Value = 3
602 sh.getCellRangeByName("A2:B3").clearContents(1 | 2 | 4 | 16)
603 def b(doc, sh): argument
604 sh.Rows.insertByIndex(2, 2)
605 sh.Rows.insertByIndex(3, 1)
606 sh.Rows.removeByIndex(2, 3)
607 sh.Columns.insertByIndex(1, 2)
608 sh.Columns.removeByIndex(2, 1)
609 sh.getCellByPosition(0, 0).Value = 7
610 def c(doc, sh): argument
611 sh.Rows.insertByIndex(4, 3)
612 sh.getCellByPosition(0, 5).Value = 1
613 sh.Rows.removeByIndex(5, 2)
614 sh.Rows.removeByIndex(3, 1)
615 def d(doc, sh): argument
616 … sh.moveRange(sh.getCellByPosition(7, 0).CellAddress, sh.getCellRangeByName("A1:B2").RangeAddress)
617 sh.getCellByPosition(7, 0).Value = 5
618 … sh.moveRange(sh.getCellByPosition(9, 3).CellAddress, sh.getCellRangeByName("H1:I2").RangeAddress)
619 … sh.copyRange(sh.getCellByPosition(0, 12).CellAddress, sh.getCellRangeByName("C1:D4").RangeAddress)
620 sh.Rows.removeByIndex(0, 1)
621 def e(doc, sh): argument
625 sh.getCellByPosition(0, 0).Value = 8
626 sh.Columns.removeByIndex(0, 1)
628 def f(doc, sh): argument
629 sh.getCellByPosition(0, 0).String = "multi\nline"
630 sh.getCellByPosition(1, 0).Value = 1.5
631 sh.getCellByPosition(2, 0).Formula = "=1+1"
632 sh.getCellByPosition(3, 0).Formula = '="s"&"t"'
633 sh.getCellByPosition(0, 0).Value = 3
634 sh.Rows.removeByIndex(0, 1)
635 sh.Rows.removeByIndex(0, 4)
651 sh = doc.Sheets.getByIndex(0)
652 sh.Name = "SrcSheet"
655 sh.getCellByPosition(c, r).Value = r * 4 + c
666 sh = doc.Sheets.getByIndex(0)
675 sh = doc.Sheets.getByIndex(i)
676 sh.link(url, "SrcSheet", "calc8", "", E("SheetLinkMode", mode))
689 sh = doc.Sheets.getByIndex(0)
692 sh.getCellByPosition(c, r).Value = r * 4 + c
733 sh = doc.Sheets.getByIndex(i)
735 sh.getCellByPosition(0, r).String = "k%d" % r
737 sh.getCellByPosition(c, r).Value = r + c + i
738 sh.getCellByPosition(1, 0).String = "h1"
739 sh.getCellByPosition(2, 0).String = "h2"
760 sh = doc.Sheets.getByIndex(i)
762 sh.getCellByPosition(0, r).String = "k%d" % r
764 sh.getCellByPosition(c, r).Value = r + c + i
782 sh = doc.Sheets.getByIndex(0)
784 sh.getCellByPosition(0, r).Value = r + 1
785 sh.getCellByPosition(1, 0).Formula = "=SUM(A1:A4)"
786 sh.getCellByPosition(1, 1).Formula = "=B1*2"
787 sh.getCellByPosition(1, 2).Formula = "=1/0"
788 sh.getCellByPosition(1, 3).Formula = "=B3+1"
789 v = sh.getCellByPosition(2, 0).Validation
794 sh.getCellByPosition(2, 0).Validation = v
795 sh.getCellByPosition(2, 0).Value = 99
800 ctrl.select(sh.getCellRangeByName(addr))
812 sh = doc.Sheets.getByIndex(0)
814 sh.getCellByPosition(0, r).Value = r
815 dp = sh.DrawPage
824 shp.Anchor = sh.getCellRangeByName(anchor_cell) if anchor_cell is not None else sh
928 sh = doc.Sheets.getByIndex(0)
931 sh.getCellByPosition(c, r + 20).Value = r + c
947 cell = sh.getCellByPosition((k // 100) * 3, k % 100)
959 sh = doc.Sheets.getByIndex(0)
960 sh.Name = "Data sheet"
964 sh.getCellByPosition(0, r).Value = r
965 sh.getCellByPosition(1, r).String = "t%d" % r
975 sh.getCellByPosition(3, i).Formula = f
977 step("array-1", sh.getCellRangeByName("F1:G2").setArrayFormula, "=A1:B2*2")
978 step("array-2", sh.getCellRangeByName("H1:H3").setArrayFormula, "=A1:A3+1")
979 step("array-3", sh.getCellRangeByName("J1:K1").setArrayFormula, "=TRANSPOSE(A1:A2)")
980 sh.getCellByPosition(14, 0).Formula = "=A5*2+A6"
982 …step("tableop-col", sh.getCellRangeByName("O2:O5").setTableOperation, sh.getCellRangeByName("N1:O1…
983 …step("tableop-row", sh.getCellRangeByName("Q2:R2").setTableOperation, sh.getCellRangeByName("P1:P2…
984 …step("tableop-both", sh.getCellRangeByName("U2:W4").setTableOperation, sh.getCellRangeByName("T1:T…
991 sh = doc.Sheets.getByIndex(0)
992 fill_table(sh)
1006 step("print-areas", sh.setPrintAreas, (rng_addr(0, 0, 0, 4, 5), rng_addr(0, 0, 8, 4, 11)))
1007 step("title-rows", sh.setPrintTitleRows, True)
1008 step("title-rows-r", sh.setTitleRows, rng_addr(0, 0, 0, 0, 0))
1009 step("title-cols", sh.setPrintTitleColumns, True)
1010 step("title-cols-r", sh.setTitleColumns, rng_addr(0, 0, 0, 0, 0))
1017 sh = doc.Sheets.getByIndex(0)
1018 fill_table(sh)
1027 rg = sh.getCellRangeByName("%s2:%s12" % ("ABCDEFGHI"[i], "ABCDEFGHI"[i]))
1044 sh = doc.Sheets.getByIndex(0)
1045 fill_table(sh)
1047 sh.getCellByPosition(8, r).Value = r / 24.0 + 0.1
1054 sh.getCellByPosition(8, r).NumberFormat = tk
1058 sh.getCellByPosition(9, 0).Value = 2.5
1059 sh.getCellByPosition(9, 0).NumberFormat = dk
1060 sh.getCellByPosition(9, 1).Formula = "=TIME(1;2;3)"
1061 sh.getCellByPosition(9, 1).NumberFormat = tk
1062 sh.getCellByPosition(9, 2).Formula = '=TIME(1;2;3)+DATE(2020;1;1)'
1066 sh.getCellByPosition(9, 3).Value = 12.5
1067 sh.getCellByPosition(9, 3).NumberFormat = ck
1068 sh.getCellByPosition(9, 5).Formula = "=TRUE()"
1069 sh.getCellByPosition(9, 6).Formula = '="s"'
1070 sh.getCellByPosition(9, 7).Formula = "=1/0"
1071 sh.getCellByPosition(9, 8).Formula = "=NA()"
1072 sh.getCellByPosition(9, 9).String = "multi\nline two spaces\ttab"
1073 sh.Columns.getByIndex(5).IsVisible = False
1074 sh.Columns.getByIndex(7).IsVisible = False
1075 sh.Rows.getByIndex(3).IsVisible = False
1076 sh.Rows.getByIndex(4).IsVisible = False
1077 sh.Rows.getByIndex(6).Height = 1500
1078 sh.Columns.getByIndex(2).Width = 4000
1079 sh.Columns.getByIndex(3).OptimalWidth = True
1080 sh.Rows.getByIndex(7).OptimalHeight = True
1081 sh.Columns.getByIndex(4).IsStartOfNewPage = True
1082 sh.Rows.getByIndex(9).IsStartOfNewPage = True
1083 …step("group-rows", sh.group, rng_addr(0, 0, 14, 0, 18), uno.Enum("com.sun.star.table.TableOrientat…
1084 …step("group-rows2", sh.group, rng_addr(0, 0, 15, 0, 16), uno.Enum("com.sun.star.table.TableOrienta…
1085 …step("group-cols", sh.group, rng_addr(0, 11, 0, 13, 0), uno.Enum("com.sun.star.table.TableOrientat…
1086 …step("group-cols2", sh.group, rng_addr(0, 20, 0, 22, 0), uno.Enum("com.sun.star.table.TableOrienta…
1087 step("hide-grp-rows", sh.hideDetail, rng_addr(0, 0, 15, 0, 16))
1088 step("hide-grp-cols", sh.hideDetail, rng_addr(0, 20, 0, 22, 0))
1089 m = sh.getCellRangeByName("L5:N7")
1092 cell = sh.getCellByPosition(c, r)
1115 v = sh.getCellByPosition(12, 4).Validation
1119 sh.getCellByPosition(12, 4).Validation = v
1121 sh.getCellRangeByName("P1:Q1").merge(True)
1122 sh.getCellRangeByName("P3:P5").merge(True)
1123 sh.getCellRangeByName("S1:T2").setArrayFormula("=A2:B3+1")
1124 sh.getCellRangeByName("V1:V3").setArrayFormula("=A2:A4*2")
1125 …sh.getCellRangeByName("A1:B2").CellProtection = struct("com.sun.star.util.CellProtection", True, T…
1126 …sh.getCellRangeByName("C1:C2").CellProtection = struct("com.sun.star.util.CellProtection", False, …
1135 sh.TabColor = 0x00FF00
1143 sh = doc.Sheets.getByIndex(0)
1144 fill_table(sh, 20)
1145 rg = sh.getCellRangeByName("A1:E20")
1150 sh.Rows.getByIndex(18).IsVisible = False