emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] How to pass table to SRC block as strings only?


From: Sébastien Brisard
Subject: [O] How to pass table to SRC block as strings only?
Date: Thu, 19 Jan 2017 07:55:21 +0100

Hello all,
here is a MWE

=====BEGIN MWE=====

#+NAME: table20170119
| col1 | col2       |
|------+------------|
| row1 | 1234567890 |
| row2 | a          |
| row3 | b          |
| row4 | c          |

#+BEGIN_SRC emacs-lisp :var table=table20170119 :colnames yes :results output
  (print (map 'list (lambda (row) (nth 1 row)) table))
#+END_SRC

#+RESULTS:
:
: (1234567890.0 "a" "b" "c")

=====END MWE=====

As you can see, col #1, row #1 is parsed as a float. I would like it
to be parsed as a string. In other words, the expected RESULTS are

=====BEGIN EXPECTED RESULT=====

#+RESULTS:
:
: ("1234567890" "a" "b" "c")

=====END EXPECTED RESULT=====

Is there an option to prevent org from interpreting the cell values? I
noticed that org-table-to-lisp returns all cells as strings. That's
the functionality I am looking for, in header arguments.

Thanks for your help,
Sébastien




reply via email to

[Prev in Thread] Current Thread [Next in Thread]