From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Jerram Subject: Re: import excel files into org Date: Wed, 28 Jun 2017 10:47:52 +0100 Message-ID: <0b30ada6-6b3f-a086-30f5-c8b8b990d360@ossau.homelinux.net> References: <87h8z1tlqh.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQ9Zq-0003Nv-7V for emacs-orgmode@gnu.org; Wed, 28 Jun 2017 05:48:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dQ9Zm-0004O9-72 for emacs-orgmode@gnu.org; Wed, 28 Jun 2017 05:48:02 -0400 Received: from smtp-out-1.talktalk.net ([62.24.135.65]:23904) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dQ9Zl-0004NP-Vv for emacs-orgmode@gnu.org; Wed, 28 Jun 2017 05:47:58 -0400 Received: from [10.37.7.160] (unknown [213.86.221.35]) by arudy.520b.com (Postfix) with ESMTPSA id 0493038084 for ; Wed, 28 Jun 2017 10:38:42 +0100 (BST) In-Reply-To: <87h8z1tlqh.fsf@mat.ucm.es> Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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