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 <jamshar...@gmail.com> writes: > At Wed, 10 Jul 2013 09:20:25 +0530, > Jambunathan K wrote: >> James Harkins <jamshar...@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