kjambunathan / org-mode-ox-odt

The Authoritative fork of Org mode's ODT exporter
GNU General Public License v3.0
47 stars 9 forks source link

bug when try to export a large table that uses vmax (and the new alias) #255

Closed ouboub closed 1 year ago

ouboub commented 1 year ago

Hi

I cannot convert the following table (which is now a serious problem)

#+Name: propuesta-pad
| Nombre | Q1 | PesoQ1 | Q2 | PesoQ2 | Q3 | PesoQ3 | PubRes | PubScl3 | ProyNac | PesoPrNac | ProyEu | PesoEU | ProyAut | PesoAut | ProyTot | ProySca1 | CongInter | PesoCongInter | CongNac | PesoCongNac | Conf | PesoConf | Sem | PesoSem | Conftot | ConfSca1 | InvTot3 |
|--------+----+--------+----+--------+----+--------+--------+---------+---------+-----------+--------+--------+---------+---------+---------+----------+-----------+---------------+---------+-------------+------+----------+-----+---------+---------+----------+---------|
| User   |  2 |      1 |  1 |   0.75 |  0 |    0.5 |   2.75 |    0.80 |       2 |       0.5 |      0 |   0.75 |       0 |    0.25 |    1.00 |     0.67 |         0 |           0.1 |       0 |        0.05 |    0 |     0.05 |   0 |    0.05 |    0.00 |      0.0 |    1.47 |
| User   |  2 |      1 |  0 |   0.75 |  0 |    0.5 |   2.00 |    0.59 |       0 |       0.5 |      0 |   0.75 |       0 |    0.25 |    0.00 |     0.00 |         0 |           0.1 |       0 |        0.05 |    0 |     0.05 |   0 |    0.05 |    0.00 |      0.0 |    0.59 |
| User   |  0 |      1 |  0 |   0.75 |  0 |    0.5 |   0.00 |    0.00 |       0 |       0.5 |      0 |   0.75 |       0 |    0.25 |    0.00 |     0.00 |         0 |           0.1 |       0 |        0.05 |    0 |     0.05 |   0 |    0.05 |    0.00 |      0.0 |    0.00 |
| User   |  0 |      1 |  3 |   0.75 |  0 |    0.5 |   2.25 |    0.66 |       0 |       0.5 |      0 |   0.75 |       0 |    0.25 |    0.00 |     0.00 |         1 |           0.1 |       0 |        0.05 |    0 |     0.05 |   0 |    0.05 |    0.10 |      0.0 |    0.66 |
| User   |  0 |      1 |  0 |   0.75 |  0 |    0.5 |   0.00 |    0.00 |       0 |       0.5 |      0 |   0.75 |       0 |    0.25 |    0.00 |     0.00 |         0 |           0.1 |       0 |        0.05 |    0 |     0.05 |   0 |    0.05 |    0.00 |      0.0 |    0.00 |
| User   |  5 |      1 |  3 |   0.75 |  0 |    0.5 |   7.25 |    2.12 |       3 |       0.5 |      0 |   0.75 |       0 |    0.25 |    1.50 |     1.00 |         3 |           0.1 |      24 |        0.05 |    0 |     0.05 |   0 |    0.05 |    1.50 |      1.0 |    4.12 |
| User   |  1 |      1 |  0 |   0.75 |  0 |    0.5 |   1.00 |    0.29 |       0 |       0.5 |      0 |   0.75 |       0 |    0.25 |    0.00 |     0.00 |         0 |           0.1 |       0 |        0.05 |    0 |     0.05 |   0 |    0.05 |    0.00 |      0.0 |    0.29 |
| User   |  0 |      1 |  0 |   0.75 |  0 |    0.5 |   0.00 |    0.00 |       0 |       0.5 |      0 |   0.75 |       0 |    0.25 |    0.00 |     0.00 |         0 |           0.1 |       0 |        0.05 |    0 |     0.05 |   0 |    0.05 |    0.00 |      0.0 |    0.00 |
| User   |  7 |      1 |  3 |   0.75 |  2 |    0.5 |  10.25 |    3.00 |       2 |       0.5 |      0 |   0.75 |       0 |    0.25 |    1.00 |     0.67 |         2 |           0.1 |       6 |        0.05 |    6 |     0.05 |   2 |    0.05 |    0.90 |     0.67 |    4.34 |
| User   |  2 |      1 |  0 |   0.75 |  2 |    0.5 |   3.00 |    0.88 |       0 |       0.5 |      0 |   0.75 |       0 |    0.25 |    0.00 |     0.00 |         0 |           0.1 |       0 |        0.05 |    0 |     0.05 |   0 |    0.05 |    0.00 |      0.0 |    0.88 |
#+TBLFM: $8=$2*$3+$4*$5+$6*$7;f2::$9=($8/vmax(@2$8..@11$8))*3;f2::$16=$10*$11+$12*$13+$14*$15;f2::$17=$16/vmax(@2$16..@11$16);f2::$26=$18*$19+$20*$21+$22*$23+$24*$25;f2::$28=$9+$17+$27;f2
#+END:

the formula seem all correct, however I obtain the following error:

Quit
previous-line: Beginning of buffer [8 times]
Saving file /home/oub/UCM-Ay_Doc23/HG-Candidatos/bug.org...
Wrote /home/oub/UCM-Ay_Doc23/HG-Candidatos/bug.org
‘org-odt-extra-styles’ and ‘org-ods-automatic-styles’ is updated for this session
ODT Zip Dir is /tmp/odt-YLCp84/
Formatting LaTeX using mathml
org-ods-encode-digit: Invalid digit 27

although I have set debug-on-error to t, I did not obain a useful debug message

kjambunathan commented 1 year ago

The table exports successfully and transposed table retains the formula .... Just use the above definition of org-ods-encode-digit.

Zip file

big-table.zip

Screenshots

big-table-and-big-table-transposed

kjambunathan commented 1 year ago

I do, BTW, it I received from the LO list a message telling me that indeed one could split tables in calc, and link them. Not that I am going to try that now, just to let you know, in case you didn't know it.

I think you are referring to [Re: [libreoffice-users] split a huge table in subtables (say on different sheets) and link some columns between these tables](https://listarchives.tdf.io/i/MBeEE3J8Q4JsFs1d_n3a44QG)

Create a bug report ...

Please include both

(I will take up the task of assessing or improving the mapping from TBLFM to Calc Formula)