all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bug: org-table-import fails to import xlxs files
@ 2020-09-12 11:50 swedebugia
  2020-09-13  7:40 ` swedebugia
  2020-09-13 17:15 ` Bastien
  0 siblings, 2 replies; 6+ messages in thread
From: swedebugia @ 2020-09-12 11:50 UTC (permalink / raw)
  To: emacs-orgmode

Hi

Thanks for a making this fantastic program!

I think I found a bug.

When trying to import a xslx table into org-mode I get a lot of binary
data instead of a table back.

I would rather either get an error saying it is not supported yet or an
org-table.

Recoll supports xlsx files it seems, so it should be possible
with python 3 at least to make this work also in org-mode. See
https://www.lesbonscomptes.com/recoll/pages/features.html

I found this in Arch:
$ pacman -Ss xlsx
community/python-openpyxl 3.0.5-1
    A Python library to read/write Excel 2007 xlsx/xlsm files

Other ones written in python:
https://github.com/dilshod/xlsx2csv (not that active)
https://github.com/wireservice/csvkit (active)

Also gnumeric can convert it:
The Gnumeric spreadsheet application comes with a command line utility
called ssconvert that can convert between a variety of spreadsheet
formats:

$ ssconvert Book1.xlsx newfile.csv
Unfortunately it is only available with the gnumeric GUI currently
which is ~14MB bloat. 
See
http://stackoverflow.com/questions/10557360/ddg#10580741
Source here https://gitlab.gnome.org/GNOME/gnumeric (active)

Cheers
swedebugia


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug: org-table-import fails to import xlxs files
  2020-09-12 11:50 Bug: org-table-import fails to import xlxs files swedebugia
@ 2020-09-13  7:40 ` swedebugia
  2020-09-13  8:13   ` swedebugia
  2020-09-13 17:15 ` Bastien
  1 sibling, 1 reply; 6+ messages in thread
From: swedebugia @ 2020-09-13  7:40 UTC (permalink / raw)
  To: emacs-orgmode

On Sat, 12 Sep 2020 13:50:43 +0200
swedebugia <swedebugia@riseup.net> wrote:

> Hi
> 
> Thanks for a making this fantastic program!
> 
> I think I found a bug.
> 
> When trying to import a xslx table into org-mode I get a lot of binary
> data instead of a table back.
> 
> I would rather either get an error saying it is not supported yet or
> an org-table.
> 
> Recoll supports xlsx files it seems, so it should be possible
> with python 3 at least to make this work also in org-mode. See
> https://www.lesbonscomptes.com/recoll/pages/features.html
> 
> I found this in Arch:
> $ pacman -Ss xlsx
> community/python-openpyxl 3.0.5-1
>     A Python library to read/write Excel 2007 xlsx/xlsm files
> 
> Other ones written in python:
> https://github.com/dilshod/xlsx2csv (not that active)
> https://github.com/wireservice/csvkit (active)
> 
> Also gnumeric can convert it:
> The Gnumeric spreadsheet application comes with a command line utility
> called ssconvert that can convert between a variety of spreadsheet
> formats:
> 
> $ ssconvert Book1.xlsx newfile.csv
> Unfortunately it is only available with the gnumeric GUI currently
> which is ~14MB bloat. 
> See
> http://stackoverflow.com/questions/10557360/ddg#10580741
> Source here https://gitlab.gnome.org/GNOME/gnumeric (active)
> 
> Cheers
> swedebugia
> 

I also found this nice and small rust program that works well:
https://github.com/zitsen/xlsx2csv.rs
It is surprisingly large though:
8.7M Sep 12 16:53 .cargo/bin/xlsx2csv
Which is way more than ssconvert, but on the other hand it does not
require any gnome dependencies or GUI stuff:
38K Sep  5 16:21 /usr/bin/ssconvert

cheers


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug: org-table-import fails to import xlxs files
  2020-09-13  7:40 ` swedebugia
@ 2020-09-13  8:13   ` swedebugia
  0 siblings, 0 replies; 6+ messages in thread
From: swedebugia @ 2020-09-13  8:13 UTC (permalink / raw)
  To: emacs-orgmode

On Sun, 13 Sep 2020 09:40:03 +0200
swedebugia <swedebugia@riseup.net> wrote:

> 
> I also found this nice and small rust program that works well:
> https://github.com/zitsen/xlsx2csv.rs
> It is surprisingly large though:
> 8.7M Sep 12 16:53 .cargo/bin/xlsx2csv
> Which is way more than ssconvert, but on the other hand it does not
> require any gnome dependencies or GUI stuff:
> 38K Sep  5 16:21 /usr/bin/ssconvert
> 
> cheers
> 

Just for fun I compared the speed, and the found that ssconvert is
slower by a factor of 10 on a ~4500 line spreadsheet.

$ time xlsx2csv test.xlsx 
* Preparing write to ./Tabelle1.csv
** sheet range size is (4770, 11)
** Starting writing
** Done with sheet
`Tabelle1` real	0m0.565s
user	0m0.537s
sys	0m0.021s

$ time ssconvert
test.xlsx test.csv

real	0m4.249s
user	0m4.186s
sys	0m0.061s


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug: org-table-import fails to import xlxs files
  2020-09-12 11:50 Bug: org-table-import fails to import xlxs files swedebugia
  2020-09-13  7:40 ` swedebugia
@ 2020-09-13 17:15 ` Bastien
  2020-09-14  6:27   ` swedebugia
  1 sibling, 1 reply; 6+ messages in thread
From: Bastien @ 2020-09-13 17:15 UTC (permalink / raw)
  To: swedebugia; +Cc: emacs-orgmode

Hi,

swedebugia <swedebugia@riseup.net> writes:

> When trying to import a xslx table into org-mode I get a lot of binary
> data instead of a table back.

Indeed!  Let's have Org throw an error in such cases, I made this
change in master as 9c31cba00.

Thanks,

-- 
 Bastien


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug: org-table-import fails to import xlxs files
  2020-09-13 17:15 ` Bastien
@ 2020-09-14  6:27   ` swedebugia
  2020-09-14 12:39     ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: swedebugia @ 2020-09-14  6:27 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Den Sun, 13 Sep 2020 19:15:58 +0200
skrev Re: Bug: org-table-import fails to import xlxs files:

> Hi,
> 
> swedebugia <swedebugia@riseup.net> writes:
> 
> > When trying to import a xslx table into org-mode I get a lot of
> > binary data instead of a table back.  
> 
> Indeed!  Let's have Org throw an error in such cases, I made this
> change in master as 9c31cba00.
> 
> Thanks,
> 

Thank you!

Do you have any idea how I can setup org-mode to use a convert
tool before trying to import?

cheers


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug: org-table-import fails to import xlxs files
  2020-09-14  6:27   ` swedebugia
@ 2020-09-14 12:39     ` Bastien
  0 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2020-09-14 12:39 UTC (permalink / raw)
  To: swedebugia; +Cc: emacs-orgmode

Hi,

swedebugia <swedebugia@riseup.net> writes:

> Do you have any idea how I can setup org-mode to use a convert
> tool before trying to import?

Nope, sorry!

-- 
 Bastien


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-14 12:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-12 11:50 Bug: org-table-import fails to import xlxs files swedebugia
2020-09-13  7:40 ` swedebugia
2020-09-13  8:13   ` swedebugia
2020-09-13 17:15 ` Bastien
2020-09-14  6:27   ` swedebugia
2020-09-14 12:39     ` Bastien

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.