MCPcopy Index your code
hub / github.com/Persper/code-analytics / main

Function main

tools/excel_charts/excel.py:38–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36
37
38def main():
39 wb = Workbook()
40 ws = wb.active
41 data = [[x] for x in range(10)]
42 fillout(ws, (1, 1), data)
43
44 data = [[x, 2 * x] for x in range(10)]
45 fillout(ws, (2, 2), data)
46
47 data = [['Sheet1 rank distance', 'Sheet1 value distance'],
48 [0.0, 0.5], [1.0, 0.5]]
49 fillout(ws, (1, 2), data)
50
51 print(sheet(wb, 'Sheet'))
52 print(sheet(wb, 'InvalidSheetName'))
53
54 print(fillin(ws, (1, 1), 10, 1))
55 print(fillin(ws, (2, 2), 10, 2))
56
57 i = 0
58 while True:
59 c = cell(ws, (2, 1), step_column=2, index=i)
60 if c.value is None:
61 break
62 print(c.value)
63 i += 1
64
65 wb.save('check.xlsx')
66
67
68if __name__ == '__main__':

Callers 1

excel.pyFile · 0.70

Calls 5

filloutFunction · 0.85
sheetFunction · 0.85
fillinFunction · 0.85
cellFunction · 0.85
saveMethod · 0.45

Tested by

no test coverage detected