Questions tagged [org-table]

for questions about Org mode's ASCII table editor. Use this tag for its spreadsheet calculations and plotting features as well.

Filter by
Sorted by
Tagged with
37
votes
2answers
15k views

Multicolumn cells in org-mode tables

Is it possible to merge two or more cells in an org-mode table like when using \multicolumn{}{}{} or \multirow{}{}{} in LaTeX? Something like this does not work: |------------+-----------+----------+...
17
votes
4answers
3k views

Can I format cells in an org-mode table differently depending on a formula?

I have a column in an org-mode table with numbers in each cell. I'd like to change the background color of the cell to red if the number is below 1 or above 2. How can I do that?
13
votes
3answers
9k views

Wrap cell content in an org mode table

I have a table like this: | Verse No | Verse | | | <10> | | 1 | line1 li=> | | 2 | line2 li=> | I would like to view it as | Verse No | Verse | | ...
13
votes
1answer
703 views

Is it possible to have the entire org-table use math environment?

I have an org-mode table that needs to have some math text in each cell. Wrapping every cell with $ both looks ugly and takes much more space than it deserves. Is there any way to somehow put the ...
13
votes
1answer
4k views

What is the difference between sh and shell for org-babel?

I'm experimenting with sourcing data from org-mode into my shell scripts and I've run across a weirdness: #+tblname: simple-table | 1 | | 2 | | 3 | | 4 | | 5 | #+name: work-with-simple-list-shell #+...
12
votes
2answers
865 views

Align columns in Org mode table with Japanese fonts

How can I mix Japanese and English in the same org-mode table (that uses fixed-width fonts)? Something like: | m m m m m m | | | はどう デシウ | | | ハーフ | ハーフ | won't align. ...
11
votes
5answers
745 views

Preview fields in org table

Sometimes it is convenient to set a manual column width when creating a table in org-mode. This makes it so that columns do not have to grow to the size of their longest entry. When an entry in and ...
11
votes
2answers
2k views

How can I filter table in org mode

For example, I want to filter table that make it shows the row which only contains "USA" string in the column 3 and 4.
11
votes
1answer
729 views

Org Mode: Using table formula outside of a table?

I'm wondering whether it's possible to display the result of calculations performed on table data, outside of a table. For example, suppose I have a table of with a list of names. Is it possible to ...
11
votes
1answer
2k views

Org-table: is it possible to have automatic line wrapping inside org-tables?

Org-table has a very convenient property, it expands the width of a table column if needed to show all your text in a cell. Alternatively, you can set a fixed width for a table column and let your ...
11
votes
2answers
193 views

Avoid displaying “=>” when a field is clipped in org-table?

How can I avoid displaying "=>" when a field is clipped in org-table? Those arrows dominate some narrow cells, and I can view the full field in a tool-tip window anyway, so I'd like to get rid of them....
10
votes
1answer
438 views

Truncate beginning of right-aligned column in org table

I have a column in an org-mode table that contains long file names. The interesting part of the filename is the last few characters rather than the first. For example, given the files below: /data/...
9
votes
2answers
1k views

Generating tables with headers from code block

I would like to generate tables that have headers from code blocks. Something like this: #+BEGIN_SRC emacs-lisp :results value table :table-header | First | Second | (identity '((a b) (c d))) #+...
9
votes
1answer
2k views

Org tables: Wrap all fields in column to a given size

In org it is possible to set a column width like follows: |---+------------------------------| |---+----------------| | | | | | <14>...
8
votes
2answers
3k views

Is it possible to copy /paste multiple lines of text into cells of org-mode table?

Here is my question, I have multiple lines of text, line this: line1 line2 line3 ... And I want to create a org-mode table like this: | C1 | |-------| | line1 | | line2 | | line3 | | .... | ...
8
votes
2answers
2k views

Org mode: Using todo-items or checkboxes in tables

I have several items that I need to perform the same tasks on. To get an overview, I wanted to use a table, where the columns would show me how many are done, something like this: +------+------------...
8
votes
1answer
1k views

Reference the last column / row in an org-mode table

The Situation: I read the Org Spreadsheet tutorial but couldn't find an answer. Commonly, I want to have the result of a formula in the last row of a table, i.e., have something like #+TBLFM: @LAST$...
8
votes
2answers
3k views

org-mode table exports centered - change to left?

I'm exporting a simple org-table through LaTeX to PDF: | a | b | c | | 1 | 2 | 3 | After export with C-c C-e l o the PDF contains a centered table, and I'd rather have it on the left (to be clear, I'...
7
votes
1answer
586 views

org-mode : in a table, calculate a person's age based on their birthday

Let's say I have the following table: | Name | Age | Date of Birth | Income | |--------+------------------+------------------+--------| | Joe | | <1984-02-20 ...
7
votes
1answer
1k views

Sorting an org-mode table with horizontal lines

I have a table in org-mode which has the following format: | Name | email | number | |------------+-----------------+--------| | Doe, John | jod@example.org | 7 | | Doe, Jane | ...
7
votes
1answer
379 views

Aligning org tables with rendered LaTeX formulae

Org tables do a great job in aligning columns with plain text. But the alignment is lost when math formulas (in LaTeX) in cells are replaced with their preview. Is it possible to preview LaTeX in ...
6
votes
1answer
2k views

Create table for existing data using org-mode

Is there a way of creating table for existing data using org-mode ? Let's assume I have the following data row1 row2 row3 And now I want to create a table of dimension 1x3 (col*row) on it. The ...
6
votes
2answers
790 views

How to programmatically update a named org-table in-situ

It's possible to programmatically update an org table inside a babel source code block like the following: #+name: mytable | 0 | 0 | 0 | | 0 | 0 | 0 | #+begin_src emacs-lisp :var table=mytable (...
6
votes
1answer
915 views

Remove Task state keywords (TODO/DONE) from clocktable reports?

Org-mode's Clocktable reports show the task state "TODO/OPEN/DONE" at the beggining of the headline: like so: | | TODO Bug 459487 - [GTK] Replace... | 7:38 | | | | ...
6
votes
3answers
3k views

How to select (and copy) a column of an org table *without* rectangle selection?

It seems to me that the normal way to copy a column of an org table is by rectangle selection (see here). That is, first the column is selected by marking all of it by hand, and then it is copied with ...
6
votes
2answers
344 views

How to copy org-table to postgresql database?

With sqlite one can easily populate a table in a database via a org-table like so: [EDIT](using only one sqlite-scr-block with org-table variable parameter)[/EDIT] #+NAME: A | val1 | val2 | |------+...
6
votes
1answer
479 views

Org-Mode: Using Source Code Blocks in Table Formulas

I would like to use source code blocks in org-mode table formulas using something similar to: #+NAME: square #+BEGIN_SRC python :var x=0 return x**2 #+END_SRC | 1 | 1 | | 2 | 4 | | 3 | 9 | #+TBLFM: $...
6
votes
1answer
603 views

time value in org-table formula

Is there any way to have time constant in an Org spreadsheet formula? For example, i would like to have something like this: @>$3=@>$5-'08:00:00'*vcount(@2..@-1) to calculate how much longer I'...
6
votes
1answer
503 views

Table cell alignment breaks when using latex inside org table

Let's assume we have a table that looks like this: After running org-preview-latex-fragment command I get this: As you can see the top row is not aligned with the other rows. How can one view ...
6
votes
0answers
434 views

latex inside table using table.el in org mode

I am trying to achieve multicolumn cells in org-mode tables like in Multicolumn cells in org-mode tables, but with Latex inside the cells. * Minimal Example +------------+-----------+-------------...
5
votes
2answers
286 views

Auto-update org tables before each export

I am looking for a solution (a function) that evaluates all the tables in the org file/buffer. I should be then simply able to add that to the local value of before-save-hook in org-mode. Currently, ...
5
votes
1answer
907 views

How to make the org-mode exported table aligned in GMail?

I have a table maintained by org-mode, and I would like to copy/paste it to an email. So this is what I was trying to do: export to the plain text copy/paste to the gmail However, it just cannot ...
5
votes
1answer
1k views

Add cell background colors to org-mode table in pdf export

I'd like to be able to select a specific cell in an org-mode table and add a background color to that cell for a pdf export. Such that | This Cell is formatted normally | This cell is greyed a bit| |...
5
votes
1answer
126 views

Use Results from Table A in Table B

I am a beginner at org-tables, trying to use them for computing grades in a class I'm teaching. I have a table showing attendance records for a student, resulting in a mean that I'd like to use in a ...
5
votes
1answer
872 views

Org-table running total column formula

Is it possible to write an org table colmun formula which calculates the running total of some other column? Here is a simple example of the idea: The table | 1 | | | 2 | | | 5 | | | 10 | |...
5
votes
2answers
3k views

How do I do simple addition in org mode?

I have heard that you can do math in org-mode through tables, but looking it up comes up with things about LaTeX and other confusing subjects. This is what I want to do: | | 1 | 2 | ...
5
votes
3answers
1k views

How do I insert resizebox code in org-mode tables when exporting to latex?

I'm trying to figure out how to insert a resize command inside a table environment in org-mode that exports to latex, Here is my minimal example of raw latex source vs org-mode tables: #+LATEX_CLASS:...
5
votes
1answer
419 views

Goto last line in org-table

In org-mode, I need a function to move point to the last row of a named table of arbitrary length. Example: From anywhere in the buffer, I would like to go to: #+NAME: table-with-unique-name |---+--...
5
votes
1answer
686 views

org mode table formatting issue

Using a simple keyboard macro, I copied the Font Awesome Cheat Sheet into an org table. However, I experience some weird inconsistencies when it comes to the formatting - see the picture below: Any ...
5
votes
1answer
2k views

Using File Local Variables in org-mode

Is there a way to use file local variables set in an org-mode file in the following contexts: Simply expanding the variable when text is exported (eg: to LaTeX) Passing the value to :var in a babel ...
4
votes
3answers
2k views

Exclude table in org-mode export

While I enjoy the table mode of org and love the way I can work with the data in these tables with eg Python or R I am currently stuck with a simple problem: How can I exclude the table from being ...
4
votes
4answers
329 views

org-table, how to compute Coefficient of Determination between two time fields?

I have two time fields. My productivity and sleep. I would like to run a Coefficient-Determination (As described here: http://www.r-tutor.com/elementary-statistics/simple-linear-regression/...
4
votes
2answers
822 views

org mode - add formula to generate delta column

How can I get below result with org table formula? The number of rows maybe too many, so doing it line by line is not good way. For example: @1$2 = @1$1 - @1$1 @2$2 = @2$1 - @1$1 @3$2 = @3$1 - @2$1 ...
4
votes
1answer
592 views

Painfully simple org spreadsheet question

I am an English teacher who is profoundly not good at math, but I want to make some simple calculations with an org-mode table. I've tried reading online, but am afraid the explanations are just not ...
4
votes
3answers
467 views

Display org-mode src R results horizontally

Is there a way to show the results of a Source Block horizontally, or equivalently to transpose an org-table? For example, I have the following: #+begin_src R :results table c('a','b','c') #+end_src ...
4
votes
2answers
5k views

How to have the sum of a column (with computed data) in the first row?

In org-mode is it possible to generate a table, where there is a column which contains a value computed from values in the other columns and which contains the sum of these values? More specifically, ...
4
votes
1answer
223 views

Is it possible to insert random numbers in an org table?

I have an org-mode table |----+----+----+----+----+----+-----+-----+-----| | 40 | 40 | 30 | 20 | 50 | 50 | 100 | 100 | 200 | |----+----+----+----+----+----+-----+-----+-----| | | | | | ...
4
votes
3answers
1k views

Conditionally calculate the sum of a column depending on a fields value in another cell of the same row

In orgmode, I do have a table like the following to track my overall working time a day. It is not important for which tasks or projects or even which client I spent my time on, just if I was in ...
4
votes
1answer
843 views

How to convert org-table to list?

I've this table: |H1 |H2 |H3 | |------+------+------| |text11|text12|text13| |text21|text22|text23| |... |... |... | |textN1|textN2|textN3| |--------------------| and i want this list:...
4
votes
1answer
1k views

Display property value of each section in table like in clocktable

Context As far as I know it is possible to define properties for a section in a PROPERTIES drawer like this: * Introduction :PROPERTIES: :PlannedPages: 0.5 :ActualPages: 0.5 :END: You can see that ...

1
2 3 4 5