From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id br2UHODu61+/TAAA0tVLHw (envelope-from ) for ; Wed, 30 Dec 2020 03:07:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KH3eF+Du61+IUwAAbx9fmQ (envelope-from ) for ; Wed, 30 Dec 2020 03:07:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D07F9940341 for ; Wed, 30 Dec 2020 03:07:11 +0000 (UTC) Received: from localhost ([::1]:39300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kuRpN-0007ug-VN for larch@yhetil.org; Tue, 29 Dec 2020 22:07:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kuRou-0007sy-4i for emacs-orgmode@gnu.org; Tue, 29 Dec 2020 22:06:40 -0500 Received: from outbound-smtp11.blacknight.com ([46.22.139.106]:38227) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kuRor-0001Eh-8v for emacs-orgmode@gnu.org; Tue, 29 Dec 2020 22:06:39 -0500 Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp11.blacknight.com (Postfix) with ESMTPS id 86BFE1C6909 for ; Wed, 30 Dec 2020 03:06:34 +0000 (GMT) Received: (qmail 28356 invoked from network); 30 Dec 2020 03:06:34 -0000 Received: from unknown (HELO rt-inspiron-3480) (rt@robertthorpeconsulting.com@[109.76.74.4]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 30 Dec 2020 03:06:34 -0000 From: Robert Thorpe To: Hongyi Zhao Subject: Re: Microsoft Excel spreadsheet editing directly from within emacs. In-Reply-To: (message from Hongyi Zhao on Wed, 30 Dec 2020 07:39:26 +0800) Date: Wed, 30 Dec 2020 03:06:07 +0000 Message-ID: <874kk43sdc.fsf@robertthorpeconsulting.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=46.22.139.106; envelope-from=rt@robertthorpeconsulting.com; helo=outbound-smtp11.blacknight.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-gnu-emacs@gnu.org, emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.33 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: D07F9940341 X-Spam-Score: -2.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: wjCl4TE+1PWG Hongyi Zhao writes: > On Wed, Dec 30, 2020 at 1:55 AM Robert Thorpe > wrote: >> >> Hongyi Zhao writes: >> >> > On Tue, Dec 29, 2020 at 5:40 PM Jean Louis wrote: >> >> >> >> * Hongyi Zhao [2020-12-29 07:55]: >> >> > From this point of view, if we want to have both full-features and >> >> > powerful capabilities in manipulating spreadsheet, it seems that only >> >> > the python based programmatic tools/packages, say, openpyxl >> >> > , can meet the requirements >> >> > currently. >> >> >> >> What are you requirements? >> > >> > I use Linux as my working environment exclusively. So, I can't access >> > the native MS Office supplied for macOS/Windows. But I sometimes >> > really need to manipulate and process MS Office documents, especially >> > DOCX and XLSX files. Though there are some free and open source office >> > suites, e.g. LibreOffice, but none of them can completely compatible >> > with the MS Office. >> > >> > So, I want to find a way that can be used to programmatically complete >> > any possible work done by MS Office word/excel. >> >> Who creates the spreadsheet first? Is it you or someone else? > > From/by others, in most instances. > >> >> If it's you then things can be quite simple. You can create a >> comma-separated or tab-separated file in Emacs or something else. > > Do you mean export the org table with CSV/TSV formats? I noticed that the > default orgmode table column separator is |. I was thinking of editing using csv-mode, not using orgmode table. But if you have well behaved data it's not hard to change the separate with a search-and-replace. You've got to watch out for corner cases though like commas being used in text. >> You can then import that file into Libreoffice and then save it as a .XLSX >> or .XLS file. You can make a script in Libreoffice to do the import >> just the way you want it. > > Sounds wonderful. Is there such an example script? Last time I did this a few years ago at work. I don't have the code anymore. You can find a few things like that at the Libreoffice extensions site though https://extensions.libreoffice.org/ . >> Things are more difficult if you are given a .XLSX or .DOCX file by >> someone else. In that case you have to use Libreoffice or something >> like it straight away. You also have to be very careful was re-saving >> the file with changes because Libreoffice has some subtle >> incompatabilities with MS Excel and MS Word. >> >> If you just want to add new sheets to existing spreadsheets that is not >> too bad. The problem is changing values in existing sheets. > > You're absolutely right. BR, Robert Thorpe