mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #54] Inserting text is handled as General category in Excel #45
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AlfonsoUceda on GitHub (Jun 23, 2016).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/54
Originally assigned to: @jmcnamara on GitHub.
Hi:
@jmcnamara congrats for the work, we are using the library from a wrapper in ruby and it's amazing the speed and well structured it is.
I was making a little example using worksheet_write_string function and I noticed excel handles the cell's category as General instead Text, can it be changed to Text in code?
Thank you
Cheers!
@jmcnamara commented on GitHub (Jun 23, 2016):
Hi Alfonso,
Thanks. By the way there is a Ruby port of the same Perl/Python modules that libxlsxwriter is ported from: https://github.com/cxn03651/write_xlsx
That is the same behaviour as Excel: if you create some text is a cell the format is
General.Yes by adding a number format of
@(this is how Excel does it). For example:By default Excel stores strings in a shared strings table (a bit like a Ruby hash) and uses an index in the file to refer to the string. However, it also allows an "inline" option where the shared string table isn't used and the strings are written inline. This allow the file to be written slightly faster and without additional storage memory.
P.S. If you need the
constant_memorymode then the above Ruby module won't work for you since it doesn't support it.John
@AlfonsoUceda commented on GitHub (Jun 23, 2016):
@jmcnamara thanks so much!, I'll use the
@format for string to format as text.We aren't using that port because I need
constant_memoryfor bigger exports with XLSX file so that's the reason we built a simple wrapper@AlfonsoUceda commented on GitHub (Jun 23, 2016):
@jmcnamara works perfect! thanks again and awesome library ;)
@jmcnamara commented on GitHub (Jun 23, 2016):
Cool, I'll point people in the direction of that module when they ask questions.
@Paxa commented on GitHub (Feb 24, 2017):
I didn't find existing wrapper and made my own https://github.com/Paxa/fast_excel
Actually following same idea as https://github.com/bebanjo/xlsx_writer_wrapper
@jmcnamara commented on GitHub (Feb 24, 2017):
@Paxa
Thanks for letting me know.
Out of curiosity, how much faster are these Ruby wrapper modules in comparison to the pure Ruby write_xlsx module.
@Paxa commented on GitHub (Feb 25, 2017):
@jmcnamara
I never used write_xlsx, we were using
axlsx. My measurements:So only file generation times: CSV: 2.6, axlsx: 13.1, fast_excel: 3.5
I got best excel generation times when converting unix time to excel format by myself and write it with
worksheet_write_number(converting timezones and creating objects is expensive in ruby)@Paxa commented on GitHub (Feb 26, 2017):
Just tested
write_xlsxand fastest I can get is 88 seconds (for same 20k report as my previous comment)