1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-22 16:03:25 +00:00
mobilizon/priv/python/ods.py

13 lines
300 B
Python
Raw Normal View History

from pyexcel_ods3 import save_data
from collections import OrderedDict
from io import BytesIO as StringIO
import json
def generate(data):
struct = json.loads(data)
data = OrderedDict()
data.update({"Sheet 1": struct})
io = StringIO()
save_data(io, data)
return io.getvalue()