help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: get text from LibreOffice Calc to Emacs Org-Mode


From: Uwe Brauer
Subject: Re: get text from LibreOffice Calc to Emacs Org-Mode
Date: Tue, 25 Apr 2023 12:07:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>>> "RYvUlftGEte" == Ruijie Yu via Users list for the GNU Emacs text editor 
>>> <help-gnu-emacs@gnu.org> writes:

> Gottfried <gottfried@posteo.de> writes:

>> [[PGP Signed Part:Undecided]]
>> Hi,
>> 
>> I am learning Emacs Org-mode
>> 
>> and would like to copy text from LibreOffice Calc to Emacs Org-mode.
>> So that I don’t need to copy every single part from here to there,
>> I would prefer, time saving, to get the whole text (quite much) in one go to
>> Emacs org-mode and than adjust the text in org-mode.
>> 
>> What are the possibilities?
>> I tried to save the text in different formats, and open it in org-mode,
>> but mostly the text couldn’t be read or was not useable.

This is what I use

(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-processes '(("gnumeric" "~/.local/bin/xlsx2csv %i 
%o"))))
    (org-odt-convert xlsx-file "csv")
    (org-table-import csv-file  nil)))


(defun org-table-import-xls-to-csv-org () 
  (interactive)
  (let* ((source-file  (file-name-sans-extension (buffer-file-name 
(current-buffer))))
         (xlsx-file (concat source-file ".xls"))
         (csv-file (concat source-file ".csv")))
    (org-odt-convert xlsx-file "csv")
    (org-table-import csv-file  nil)))

(defun org-table-import-ods-to-csv-org () 
  (interactive)
  (let* ((source-file  (file-name-sans-extension (buffer-file-name 
(current-buffer))))
         (xlsx-file (concat source-file ".ods"))
         (csv-file (concat source-file ".csv")))
    (org-odt-convert xlsx-file "csv")
    (org-table-import csv-file  nil)))


> Unless I'm mistaken, it already can be copy-pasted?


-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]