Load and save tables

Values example
Load a spreadsheet from Open Document Format ods file, change values and save as html.

File type available:

  • xml, ods: load and save
  • html, xls, xlsx: save

ods import,export requires odfpy installed
xls export requires xlwt installed
xlsx export requires openpyxl installed

from simpleodspy.sodsspreadsheet import SodsSpreadSheet
from simpleodspy.sodshtml import SodsHtml
from simpleodspy.sodsods import SodsOds
 
t = SodsSpreadSheet()
 
tw = SodsOds(t)
tw.load("test.ods")
 
t.setValue("A1", "Set a cell")
 
tw = SodsHtml(t)
tw.save("test.html")