* import excel files into org
@ 2017-06-27 16:54 Uwe Brauer
2017-06-28 9:47 ` Neil Jerram
0 siblings, 1 reply; 3+ messages in thread
From: Uwe Brauer @ 2017-06-27 16:54 UTC (permalink / raw)
To: emacs-orgmode
Hi
Maybe the following is helpful:
(defun org-table-import-xlsx-to-csv-org ()
(interactive)
(let* ((source-file (file-name-sans-extension (buffer-file-name (current-buffer))))
(xlsx-file (concat source-file ".xlsx"))
(csv-file (concat source-file ".csv")))
(org-odt-convert xlsx-file "csv")
(org-table-import csv-file nil)))
(defun org-table-import-xlsx-file-to-csv-org (file)
(interactive "f")
(let* ((source-file (file-name-sans-extension (buffer-file-name (current-buffer))))
(xlsx-file (concat source-file ".xlsx"))
(csv-file (concat source-file ".csv")))
(org-odt-convert file "csv")
(org-table-import csv-file nil)))
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: import excel files into org
2017-06-27 16:54 import excel files into org Uwe Brauer
@ 2017-06-28 9:47 ` Neil Jerram
2017-06-28 16:44 ` Uwe Brauer
0 siblings, 1 reply; 3+ messages in thread
From: Neil Jerram @ 2017-06-28 9:47 UTC (permalink / raw)
To: emacs-orgmode
On 27/06/17 17:54, Uwe Brauer wrote:
> Hi
>
> Maybe the following is helpful:
>
>
> (defun org-table-import-xlsx-to-csv-org ()
> (interactive)
> (let* ((source-file (file-name-sans-extension (buffer-file-name (current-buffer))))
> (xlsx-file (concat source-file ".xlsx"))
> (csv-file (concat source-file ".csv")))
> (org-odt-convert xlsx-file "csv")
> (org-table-import csv-file nil)))
>
>
> (defun org-table-import-xlsx-file-to-csv-org (file)
> (interactive "f")
> (let* ((source-file (file-name-sans-extension (buffer-file-name (current-buffer))))
> (xlsx-file (concat source-file ".xlsx"))
> (csv-file (concat source-file ".csv")))
> (org-odt-convert file "csv")
> (org-table-import csv-file nil)))
What is the intended difference between those?
The second one looks odd, because
- xlsx-file is never used
- there doesn't appear to be any link from the CSV output from 'file'
(presumably in a file whose name is derived from 'file') and the
'csv-file' content that org then imports (in a file whose name is
derived from the current buffer).
Regards - Neil
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: import excel files into org
2017-06-28 9:47 ` Neil Jerram
@ 2017-06-28 16:44 ` Uwe Brauer
0 siblings, 0 replies; 3+ messages in thread
From: Uwe Brauer @ 2017-06-28 16:44 UTC (permalink / raw)
To: emacs-orgmode
> On 27/06/17 17:54, Uwe Brauer wrote:
> What is the intended difference between those?
The first one imports a xlsx file, which has the same name as the org
file
> The second one looks odd, because
Asks for a file.
> - xlsx-file is never used
Right, my bad
> - there doesn't appear to be any link from the CSV output from 'file'
> (presumably in a file whose name is derived from 'file') and the
> 'csv-file' content that org then imports (in a file whose name is
> derived from the current buffer).
I look into it
> Regards - Neil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-28 16:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-27 16:54 import excel files into org Uwe Brauer
2017-06-28 9:47 ` Neil Jerram
2017-06-28 16:44 ` Uwe Brauer
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).