dirigible-spreadsheet icon indicating copy to clipboard operation
dirigible-spreadsheet copied to clipboard

Export formulae

Open leenaars opened this issue 6 years ago • 4 comments

Dear folks,

first thanks very much for making this open source after you closed down Revolver!

I've always been really curious how it worked, and have finally come round to building it. Really cool! I do have one question: is it possible to export the data while retaining simple formulae? I currently only see a csv export, but that removes any cell references and replaces it with the calculated values, right? So you cannot backup and then roundtrip a document that way. Is there another option to save data - or even get it from the backend of the server?

leenaars avatar Feb 27 '19 17:02 leenaars

Actually, having an restructuredText (or similar) output would already very much suit my use cases...

leenaars avatar Feb 27 '19 18:02 leenaars

I guess you just set yourself a coding challenge!

hjwp avatar Feb 27 '19 18:02 hjwp

So can you tell me where and how the data is stored? Perhaps python-lpod can be used to turn into an OpenDocument spreadsheet ...

leenaars avatar Feb 27 '19 22:02 leenaars

I'm not sure I remember to be honest! Internally the data structure is a dict of objects which have a .value and a .formula object.

I can't remember whether we store it in a database, or on disk as json, or what... probably in the database, as json, I would guess. if you want to try and extract directly from the db, maybe check the django models and see if you can find what column it's in?

If you wanted to make an actual button and a UI for this, you could have a look at the way the csv exporter works (search the codebase for "csv") and try and make a copy of that, and modify it?

hjwp avatar Feb 28 '19 05:02 hjwp