575 B
575 B
Critical Rules (MUST follow)
- NEVER write Excel formulas to cells that will be graded on their displayed value. openpyxl does NOT compute formulas -- the evaluator will see None. Instead, compute results in Python and write literal values (numbers/strings).
- After saving the workbook, ALWAYS reopen and verify the written values:
wb2 = openpyxl.load_workbook(OUTPUT_PATH); print(wb2[sheet][cell].value) - Use the
write_filetool to create solution.py -- it avoids shell escaping issues. Do NOT useecho "..." > solution.pyfor multi-line scripts.