Tried to post yesterday evening but I was told that I had already posted to much as a new user, and have to wait for 20h till my next post.
Here is my minimal example
#! /usr/bin/env python3
"""
minimal example
Sheet 'defaults' contains cell A1 with content 'C'
Sheet 'main' contains
- C2 with content '42' (the answer to everything)
- F2 with the INDIRECT
"""
from xlsxwriter.workbook import Workbook
def main():
workbook = Workbook('minimal_example.xlsx')
sheet0 = workbook.add_worksheet('defaults')
sheet0.write_string(0, 0, 'C')
sheet = workbook.add_worksheet('Main')
sheet.write(1, 2, '42')
sheet.write_formula(1, 5, f'=INDIRECT(defaults.A1 & "2"')
sheet.activate()
workbook.close()
if __name__ == '__main__':
main()
minimal_example.xlsx (5.6 KB)