From: Jambunathan K <kjambunathan@gmail.com>
To: James Harkins <jamshark70@gmail.com>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: Use babel to import table data from OpenDocument spreadsheets?
Date: Thu, 18 Jul 2013 14:49:16 +0530 [thread overview]
Message-ID: <87a9lkns2z.fsf@gmail.com> (raw)
In-Reply-To: <874nbszmfw.wl%jamshark70@dewdrop-world.net> (James Harkins's message of "Wed, 17 Jul 2013 21:28:03 -0400")
1. Give me a sample worksheet.
2. Give me the specific unoconv command that you used for converting the
worksheet.
If you do (1) and (2), I will post a recipe.
James Harkins <jamshark70@gmail.com> writes:
> At Wed, 10 Jul 2013 09:20:25 +0530,
> Jambunathan K wrote:
>> James Harkins <jamshark70@gmail.com> 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
next prev parent reply other threads:[~2013-07-18 9:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-02 14:10 Use babel to import table data from OpenDocument spreadsheets? James Harkins
2013-07-02 14:19 ` Jambunathan K
2013-07-02 14:30 ` James Harkins
2013-07-02 15:10 ` Jambunathan K
2013-07-03 2:35 ` James Harkins
2013-07-03 3:05 ` Jambunathan K
2013-07-10 2:19 ` James Harkins
2013-07-10 3:50 ` Jambunathan K
2013-07-18 1:28 ` James Harkins
2013-07-18 9:19 ` Jambunathan K [this message]
2013-07-18 15:42 ` James Harkins
2013-07-18 19:02 ` Jambunathan K
2013-07-18 19:05 ` Jambunathan K
2013-07-18 21:32 ` James Harkins
2013-07-10 21:31 ` Andreas Leha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a9lkns2z.fsf@gmail.com \
--to=kjambunathan@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=jamshark70@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).