thscharler / spreadsheet-ods

Apache License 2.0
29 stars 6 forks source link

Error 508 when setting a formula #48

Closed Shatur closed 4 months ago

Shatur commented 4 months ago

When I try to set the following formula: MAX(-MIN({start_cell}:{end_cell}),MAX({start_cell}:{end_cell})) (where start_cell and end_cell are my variables with cell names) it results in Err:508 in the cell. But when I edit such formula in LibreOffice (by adding a space after comma, for example), it starting to work. If I undo the change (remove a space to make it as before, for example), it also works. I suspect that there might be some problem in the library when you set complex formulas like this.

Shatur commented 4 months ago

Looks like it works if I use ; instead of ,. But LibreOffice will display ; as ,.

thscharler commented 4 months ago

Yes, the encoding of formulas has one defined format in the document and that is what the library uses.

What is displayed in Calc is customizable.

That's Extras/Options in the dialog LibreOffice Calc/Formula

maybe. I use the german version and that's my translation for it.

There you can set the separators and the display syntax. I left everything at the default and checked 'Use english function names' too.

Then formulas can be copied as displayed.

Shatur commented 4 months ago

Thanks!