INNER CODE UNIT · Python

last_cell

fzumstein/python-for-excel · sales_report_openpyxl.py:98

    last_cell = sheet.cell(row=startrow + nrows, column=startcol + ncols)
    range_address = f"{first_cell.coordinate}:{last_cell.coordinate}"
    sheet.conditional_formatting.add(
        range_address,
        CellIsRule(
            operator="lessThan",
            formula=["20000"],
            stopIfTrue=True,
            font=Font(color="E93423"),
        ),
    )

    # Chart
    chart = BarChart()
    chart.type = "col"
    chart.title = "Sales per Month and Store"
    chart.height = 11.5
    chart.width = 22.5

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…