[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Use babel to import table data from OpenDocument spreadsheets?
From: |
James Harkins |
Subject: |
Re: [O] Use babel to import table data from OpenDocument spreadsheets? |
Date: |
Wed, 17 Jul 2013 21:28:03 -0400 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
At Wed, 10 Jul 2013 09:20:25 +0530,
Jambunathan K wrote:
> James Harkins <address@hidden> writes:
>
> > I found a utility, unoconv[1], which I can persuade to produce a
> > tab-separated export of the first worksheet of an ODS document.
>
> FYI, unoconv is an option provided by `org-odt-convert-processes'.
Thanks.
Okay... I finally had some time to come back to this task.
While I do appreciate all the suggestions so far, unfortunately I have to admit
that I'm still stuck. What I'd like to do now is run down what I know about it
so far and put questions in the middle of that.
1. I have a LibreOffice ODS file, where the table to obtain will be in the
first worksheet.
1a. I can use unoconv to get a tab-separated text table out of it, in a file on
disk.
1b. I will need to invoke this synchronously in an emacs-lisp block.
(shell-command ...) I guess, right?
2. I want the tab-separated text to be converted into an org-table, so that
HTML export will turn it into an HTML table. This is where it becomes
completely baffling to the novice.
2a. There's a function, org-table-import, which looks like it will do the job.
It inserts the table contents at the point. I just can't find any examples
online of the correct way to do this. I assume I will have to run an emacs-lisp
source block. I had been thinking I could use ":exports results" with a #+call,
supposing that I could write out the table text as a stream and those results
would be put in place of the #+call in the export. But of course that doesn't
make sense if org-table-import is significant for its side effect (modifying
the buffer) rather than its result.
2b. So (I guess) I would have to use emacs-lisp to move the point to a specific
location in the file before calling org-table-import (obviously not by
character index, since I can't assume previous text will not change).
QUESTION: What is the best way to do that?
^^ This is the point where I'm stuck. I really have no idea. Say I put in an
org comment "# raw data here" -- how do I get the point to go to the line after
that? How do I delete the entire old table before importing the new one?
Working example, perhaps?
Anyway, I'll be happy to write this up as a worg page after I get it working,
as it seems to me this would be a fairly common need but the information is not
easy to find.
Thanks,
hjh
- [O] Use babel to import table data from OpenDocument spreadsheets?, James Harkins, 2013/07/02
- Re: [O] Use babel to import table data from OpenDocument spreadsheets?, Jambunathan K, 2013/07/02
- Re: [O] Use babel to import table data from OpenDocument spreadsheets?, James Harkins, 2013/07/02
- Re: [O] Use babel to import table data from OpenDocument spreadsheets?, Jambunathan K, 2013/07/02
- Re: [O] Use babel to import table data from OpenDocument spreadsheets?, James Harkins, 2013/07/02
- Re: [O] Use babel to import table data from OpenDocument spreadsheets?, Jambunathan K, 2013/07/03
- Re: [O] Use babel to import table data from OpenDocument spreadsheets?, James Harkins, 2013/07/09
- Re: [O] Use babel to import table data from OpenDocument spreadsheets?, Jambunathan K, 2013/07/09
- Re: [O] Use babel to import table data from OpenDocument spreadsheets?,
James Harkins <=
- Re: [O] Use babel to import table data from OpenDocument spreadsheets?, Jambunathan K, 2013/07/19
- Re: [O] Use babel to import table data from OpenDocument spreadsheets?, James Harkins, 2013/07/18
- Re: [O] Use babel to import table data from OpenDocument spreadsheets?, Jambunathan K, 2013/07/19
- Re: [O] Use babel to import table data from OpenDocument spreadsheets?, James Harkins, 2013/07/18
- Re: [O] Use babel to import table data from OpenDocument spreadsheets?, Jambunathan K, 2013/07/19
- Re: [O] Use babel to import table data from OpenDocument spreadsheets?, Andreas Leha, 2013/07/10