Any good suggestion for read/write ms excel .xlsx file?

667 views
Skip to first unread message

chunguang qu

unread,
Sep 25, 2014, 11:13:44 AM9/25/14
to golan...@googlegroups.com
i only found one github.com/tealeg/xlsx, but it is not powerful enough for now.
Is there any other choice?
I need one something like openpyxl on python.
thanks.

Geoffrey Teale

unread,
Sep 25, 2014, 11:31:55 AM9/25/14
to chunguang qu, golang-nuts
Hi,

Just out of interest, what's missing from xlsx that you'd require?

I'm personally not aware of any other project for Go that do XLSX read/write.  

Regards,
-- 
Geoff Teale <tealeg>

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

chunguang qu

unread,
Sep 25, 2014, 12:13:14 PM9/25/14
to golan...@googlegroups.com, quchu...@gmail.com
The only reason is cooperate with others.
My favorite work environment is linux/vim/python/postgre/..., but my programmers mostly on windows/word/vbs/excle...
I wrote a lot tools for import/export things between linux and windows.
.xlsx is slow and ugly and crush sometimes when data grows bigger.
I wrote a tool by python/openpyxl, now i want to rewite all my tools by golang.

Francisco Dalla Rosa Soares

unread,
Sep 25, 2014, 12:16:40 PM9/25/14
to chunguang qu, golang-nuts
"Just out of interest, what's missing from xlsx that you'd require?"

What he meant is, as you said that package is not powerful enough,
what features that you require are not in the already existing package?

Qian Qiao

unread,
Sep 25, 2014, 12:38:09 PM9/25/14
to chunguang qu, golan...@googlegroups.com
Just a random thought. Is there anything in particular that you absolutely need from xlsx? If not, why not ask them to export it as .csv for your go program, and they can import it back as .xlsx on their end. 

chunguang qu

unread,
Sep 25, 2014, 10:03:13 PM9/25/14
to golan...@googlegroups.com, quchu...@gmail.com
Oh... sorry for my pool english. It seems xlsx cannot

* r/w xlsx files as stream. (its very important when read huge xlsx files.)
* Generate graph in xlsx files.
* r/w formula. (openpyxl can not do this either).
* change a xlsx file and save, but do not lose things (like format/gragh/formula etc.) already in it.

chunguang qu

unread,
Sep 25, 2014, 10:14:25 PM9/25/14
to golan...@googlegroups.com, quchu...@gmail.com
Yes, it is my first thought. But there's many format/chart/formula in it, .csv will lose all of them.
I like analysis data with tools from db, but others much dependent on filter/condition-format/chart in xlsx files.

Geoffrey Teale

unread,
Sep 26, 2014, 3:16:47 AM9/26/14
to chunguang qu, golang-nuts
Hi again,

Thanks for the feedback.  You are correct that xlsx cannot currently do any of the things you've listed.   Of course I'm always willing to review patches ;-)

My comments on your points:

- I have considered doing a stream based read of the sheets themselves, for performance reasons, but I've not seriously investigated it.  The most obvious change would be to stop using Go's built in XML unmarshal.

- (Naively) I doubt doing graphs is actually that hard, but I suspect the API complexity would be quite high. 

- Formulas, again, I doubt it's that hard, but I'd need to look at examples.  

- Modifying an existing file without breaking it is already a goal for me.  The main problem right now is that we don't write some of the information yet (styles are the main one).  I'm sure there's a myriad of smaller things.

Regards,
-- 
Geoff

Anssi Porttikivi

unread,
Mar 10, 2017, 2:43:20 AM3/10/17
to golang-nuts
I wonder what is the state of art here now. Excelize looks promising. And there is https://github.com/aswjh/excel also. I've been thinking to choose between Python and Go here... Some Python stuff is here http://www.python-excel.org/ Any other alternative languages ot tools sets?
Reply all
Reply to author
Forward
0 new messages