From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe Brauer Subject: org-table export to ods/xlsx etc Date: Fri, 16 Jun 2017 10:25:55 +0000 Message-ID: <87fuf0i5zg.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLoS9-000412-T5 for emacs-orgmode@gnu.org; Fri, 16 Jun 2017 06:26:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLoS6-0006o8-KH for emacs-orgmode@gnu.org; Fri, 16 Jun 2017 06:26:09 -0400 Received: from [195.159.176.226] (port=40110 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dLoS6-0006na-Ek for emacs-orgmode@gnu.org; Fri, 16 Jun 2017 06:26:06 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dLoRy-0005Vm-7h for emacs-orgmode@gnu.org; Fri, 16 Jun 2017 12:25:58 +0200 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 Hi I am sometimes in need to send my org-table spreadhseets to colleagues who are using (sigh) excel. I thought sending csv would be enough but it turns out, - that sometimes technical inapt people don't know how to open it, - when using a non english language setting say spanish, numbers like 3.4 are interpreted as text. That can be circumvented by sending the spreadheet as ods/xlsx I did not find any built in function so I came up with two solutions. One is using gnumeric but then a path must be set to its binaries and that is platform dependent. The other relies on `org-odt-convert' which uses in my case LO/OO. Somebody with better lisp skills might want to generalize the function to include in a more comfortable way other formats (defun org-table-export-to-xlsx () (interactive) (let* ((source-file (file-name-sans-extension (buffer-file-name (current-buffer)))) (csv-file (concat source-file ".csv"))) (org-table-export csv-file "orgtbl-to-csv") (org-odt-convert csv-file "xlsx")))