IronCalcΒΆ
Contents:
IronCalc is a spreadsheet engine that allows you to create, modify and save spreadsheets.
A simple example that creates a model, sets a formula, evaluates it and gets the result back:
import ironcalc as ic
# The user API: evaluates automatically after every change
model = ic.UserModel("model")
model.set_user_input(0, 1, 1, "=21*2")
assert model.get_formatted_cell_value(0, 1, 1) == "42"
# The raw API: you must evaluate yourself
raw = ic.create("model")
raw.set_user_input(0, 1, 1, "=21*2")
raw.evaluate()
assert raw.get_formatted_cell_value(0, 1, 1) == "42"