GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — pythoncantv/python/excelib.py at master · hellfish2/pythoncantv Expand file tree/ Copy pathexcelib.pyMore file actions 30 lines (22 loc) · 760 Bytes / Copy pathexcelib.pyFile metadata and controls30 lines (22 loc) · 760 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 from openpyxl import Workbook from openpyxl.style import Border wb = Workbook() def set_border(ws, cell_range): rows = ws.range(cell_range) for row in rows: row[0].style.borders.left.border_style = Border.BORDER_THIN row[-1].style.borders.right.border_style = Border.BORDER_THIN for c in rows[0]: c.style.borders.top.border_style = Border.BORDER_THIN for c in rows[-1]: c.style.borders.bottom.border_style = Border.BORDER_THIN ws = wb.get_active_sheet() ws.title = "Calculo" print wb.get_sheet_names() c= ws.cell('A1') d= ws.cell(row=9,column=9) for i in xrange(1,9): for j in xrange(1,9): ws.cell(row = i,column = j).value = i*j set_border(ws, "B2:I9") wb.save('excel.xlsx') |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |