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