christopher-ramirez / secretary

Take the power of Jinja2 templates to OpenOffice and LibreOffice.
Other
190 stars 48 forks source link

Insert a formula in a table cell #29

Closed stefanoco closed 7 years ago

stefanoco commented 8 years ago

Would bery useful to have the possibility to pass a formula as a value for a tag so that it gets converted to a table formula (if this is inside a cell). I think it should be possible by recognizing a special reference property (formula::?)

christopher-ramirez commented 8 years ago

Hi!

I really don't understand what you mean. When you talk about table formulas, I suppose you are talking about the ones in _LibreOffice Calc_. It thats correct? Tell me if I'am wrong.

If my suppositions are correct, then I would like to recall you that Secretary does not officially supports spreadsheets. For now, you can try implementing a filter which tries to do that. I would be very interested in seeing your job.

stefanoco commented 8 years ago

Sorry was not clear. I mean the formulas that LibreOffice / OpenOffice support in a table cell of a Writer document also, with a subset of capabilities compared to a full spreadsheet. When you're editing a cell content, simply digit "=" and a formula editor pops up (or Table->Formula menu).

I really love Secretary and I'm using it for extracting nice reports from our time management database. I think that adding this feature (a way of specifying a cell content in terms of a formula contained in a Python variable) would be really powerful.

It seems to me that from the XML point of view it boils down to using some specific tag, so I just need directions on where to start from in order to try to add the feature is you think it's not too difficult. I was thinking of adding a filter for a new reference property etc.