Setting values

Values example
Create a spreadsheet class and export as html.

Value type available:

  • string, e.g. "hello world"
  • float, e.g. 123.4 or 56
  • date, e.g. "2010-10-28", format must be year-month-day.
  • function, e.g. "=2/3" or "=A1+A2", must begin with '='

from simpleodspy.sodsspreadsheet import SodsSpreadSheet
from simpleodspy.sodshtml import SodsHtml
 
t = SodsSpreadSheet()
 
t.setValue("A1", "Set one cell")
t.setValue("B2:B5", "Set a range of cells")
t.setValue("D1", "2010-10-28")
t.setValue("D2", 123.5)
t.setValue("D3", "=D2*3")
 
tw = SodsHtml(t)
tw.save("test.html")