* import xls(x) into org on MacOS
@ 2021-05-31 11:18 Uwe Brauer
[not found] ` <87czt72gru.fsf@gmail.com>
2021-06-01 11:47 ` Nick Savage
0 siblings, 2 replies; 6+ messages in thread
From: Uwe Brauer @ 2021-05-31 11:18 UTC (permalink / raw)
To: emacs-orgmode
Hi
I am usually using Ubuntu 16.04, but for the coming days, I have to use
a MacBook, running 10.15 and fink installed.
I usually convert xls(x) to org, using
'(org-odt-convert-process "gnumeric")
'(org-odt-convert-processes '(("gnumeric" "/usr/bin/ssconvert %i %o")))
But gnumeric does not exist in fink, does anybody know about an
alternative?
(Yes I know I should have used macports or homebrew, but now it is too
late).
Regards
Uwe Brauer
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <87czt72gru.fsf@gmail.com>]
* Re: import xls(x) into org on MacOS
[not found] ` <87czt72gru.fsf@gmail.com>
@ 2021-06-01 6:41 ` Uwe Brauer
2021-06-01 7:05 ` Greg Minshall
0 siblings, 1 reply; 6+ messages in thread
From: Uwe Brauer @ 2021-06-01 6:41 UTC (permalink / raw)
To: Jeremie Juste; +Cc: Uwe Brauer, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 692 bytes --]
>>> "JJ" == Jeremie Juste <jeremiejuste@gmail.com> writes:
Hello Jeremie
> Hello Uwe,
> If you have python or R at hand you might want to go for this option.
> In R you would so something like.
Thanks, I first tried out the python solution, so I installed
1. Xlsx2csv that works fine for xlsx fine but not, as the name
indicates, xls
2. So I tried out csvkit, which should, in principle, also convert
xls files, well for the xls files I used, it did not.
So in summary, there are solutions for xlsx but I struggle fo find one
for xls. (I most likely could try out unconv from libre office, that
however is sort of slow).
Regards
Uwe
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: import xls(x) into org on MacOS
2021-06-01 6:41 ` Uwe Brauer
@ 2021-06-01 7:05 ` Greg Minshall
2021-06-01 8:51 ` Uwe Brauer
0 siblings, 1 reply; 6+ messages in thread
From: Greg Minshall @ 2021-06-01 7:05 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-orgmode
Uwe,
i don't know if it will work for you, but on my linux box i use
=ssconvert= from the =gnumeric= package to convert from .xls to .csv.
in one project, the make rule looks like
----
${BDIRCSVS}/%.csv: xlsxs/%.xlsx
ssconvert -T Gnumeric_stf:stf_csv $< fd://1 | \
awk '{ \
line = line $$0; \
ol = line; \
gsub("[^\"]", "", ol); \
if (length(ol)%2==0) { \
print line; \
line = "" \
} \
}' | \
grep '^,' | \
grep -v '^,,*$$' > $@
----
(i could probably puzzle out why the awk and greps, but i don't recall
at the moment.)
cheers, Greg
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: import xls(x) into org on MacOS
2021-06-01 7:05 ` Greg Minshall
@ 2021-06-01 8:51 ` Uwe Brauer
0 siblings, 0 replies; 6+ messages in thread
From: Uwe Brauer @ 2021-06-01 8:51 UTC (permalink / raw)
To: Greg Minshall; +Cc: Uwe Brauer, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 568 bytes --]
>>> "GM" == Greg Minshall <minshall@umich.edu> writes:
Hi Greg
> Uwe,
> i don't know if it will work for you, but on my linux box i use
> =ssconvert= from the =gnumeric= package to convert from .xls to .csv.
> in one project, the make rule looks like
Right this is what I also use in Ubuntu, but in fink there is no gnumeric, while
in macports and homebrew there is (no it is a bit late to switch).
I usually have to convert rather simple stuff like list of students,
that is why I most likely can do it with a simpler approach that yours.
Uwe
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: import xls(x) into org on MacOS
2021-05-31 11:18 import xls(x) into org on MacOS Uwe Brauer
[not found] ` <87czt72gru.fsf@gmail.com>
@ 2021-06-01 11:47 ` Nick Savage
2021-06-03 7:13 ` Uwe Brauer
1 sibling, 1 reply; 6+ messages in thread
From: Nick Savage @ 2021-06-01 11:47 UTC (permalink / raw)
To: emacs-orgmode
If you're looking to go the python route of importing an xls file, you
could try the xlrd package. It's actually just for xls. I'm not sure if
it converts to csv, but once you have the spreadsheet open in python
that should be a pretty trivial exercise.
Cheers,
Nick
On 5/31/21 7:18 AM, Uwe Brauer wrote:
> Hi
>
> I am usually using Ubuntu 16.04, but for the coming days, I have to use
> a MacBook, running 10.15 and fink installed.
> I usually convert xls(x) to org, using
> '(org-odt-convert-process "gnumeric")
> '(org-odt-convert-processes '(("gnumeric" "/usr/bin/ssconvert %i %o")))
>
>
> But gnumeric does not exist in fink, does anybody know about an
> alternative?
> (Yes I know I should have used macports or homebrew, but now it is too
> late).
>
> Regards
>
> Uwe Brauer
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: import xls(x) into org on MacOS
2021-06-01 11:47 ` Nick Savage
@ 2021-06-03 7:13 ` Uwe Brauer
0 siblings, 0 replies; 6+ messages in thread
From: Uwe Brauer @ 2021-06-03 7:13 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 515 bytes --]
>>> "NS" == Nick Savage <nick@nicksavage.ca> writes:
> If you're looking to go the python route of importing an xls file, you
> could try the xlrd package. It's actually just for xls. I'm not sure
> if it converts to csv, but once you have the spreadsheet open in
> python that should be a pretty trivial exercise.
Thanks, but what I was looking for was a command line package, like the
one I mentioned, xlrd, seems to involve some more fiddling.
I try, for the moment to surve with xlsx files.
Uwe
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-06-03 7:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-31 11:18 import xls(x) into org on MacOS Uwe Brauer
[not found] ` <87czt72gru.fsf@gmail.com>
2021-06-01 6:41 ` Uwe Brauer
2021-06-01 7:05 ` Greg Minshall
2021-06-01 8:51 ` Uwe Brauer
2021-06-01 11:47 ` Nick Savage
2021-06-03 7:13 ` Uwe Brauer
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).