27 Commits

Author SHA1 Message Date
Todd
988f2e3290 spreadsheet: move ColumnToIndex/IndexToColumn
Create a spreadsheet/reference package and put these functions
there. This prevents both duplication across the formula &
spreadsheet packages and a cyclic reference.
2017-10-01 19:29:13 -05:00
Todd
d7515808d8 spreadsheet: initial shared formula support 2017-10-01 19:29:13 -05:00
Todd
5bfa034ef9 gooxml: add and use a Log function
This allows redirecting or discarding any
logs produced by the library.
2017-09-30 07:09:26 -05:00
Todd
61b27ff447 spreadsheet: return cached formula values with GetString
This seems to make sense, and probably doesn't hurt in any case.
2017-09-27 22:07:21 -05:00
Todd
780ee23e1a spreadsheet: use math.Big for SetTime/GetValueAsTime
The conversion to float64 caused precision issues for
far future dates, this at least avoids the problem for
most likely all scenarios that matter and can be enhanced
by just adding more bits.
2017-09-27 22:07:21 -05:00
Todd
c5be4536a9 spreadsheet: support sorting a sheet
The file format doesn't support sorting, so we
need to sort the sheet rows and renumber after sorting.
2017-09-27 18:27:53 -05:00
Todd
5c7852d21e schema: rename spreadsheetml to sml 2017-09-23 10:01:17 -04:00
Todd
09825ac816 schema: rework schema namespaces to work around Windows issues
The go command on Windows doesn't like long path name. To
work around this, this is the first in a series of changes to
shorten the schema disk path structure in a few places.

Fixes #89
2017-09-23 10:01:17 -04:00
Todd
a6ae585a35 spreadsheet: record inf/nan as errors
As you can't directly enter NaN/Inf in Excel, there's
no great way to verify behavior.  This just ensures
that setting NaN/Inf from Go will result in a #NUM!
error in Excel.
2017-09-21 21:14:25 -04:00
Todd
00be1d037c formula: support evaluating array formulas
Array formulas are entered in Excel by pressing
Ctrl+Shift+Enter to finish the formula.  The resulting
formula is entirely in one cell, but its computed results
expand into cells the size of the array result.
2017-09-21 20:20:06 -04:00
Todd
b03eec358d spreadsheet: add xlsx2csv demo
This demo program will extract either raw or formatted
values from a spreadsheet, creating one CSV file per
sheet.
2017-09-18 22:30:08 -05:00
Todd
49e34b1d90 formula: better support for thousands separator 2017-09-18 22:30:08 -05:00
Todd
d69cf90249 format: implement support for evaluating spreadsheet number formatting
This adds support for extracting a cell's formatted value according to
the number format applied to the cell.  To do this we need to implement
a parser for Excel style format strings and support formatting numbers
according to that style.

This also enhances the General formatting to be much closer to what
Excel normally does. There are likely still a few corner cases where
Excel and gooxml differ, but hopefully not too many.
2017-09-18 22:30:08 -05:00
Todd
17a365ee93 spreadsheet: start adding support for formula evaluation
We can take advantage of cached formula results that Excel/LibreOffice
insert to ensure that our formula results match the expected results.
2017-09-14 22:17:42 -05:00
Todd
111567b74e spreadsheet: default new cells to numeric with implicit zero value 2017-09-14 22:17:42 -05:00
Todd
924140c87d spreadsheet: add support for merged cells 2017-09-07 19:12:30 -04:00
Todd
2498814f67 spreadsheet: add support for hyperlinks 2017-09-07 06:12:41 -04:00
Todd
adb206e663 spreadsheet: always set cell reference numbers 2017-09-07 06:12:41 -04:00
Todd
0aebfb3d95 spreadsheet: pass sheet/row information down to cell wrapper 2017-09-07 06:12:41 -04:00
Todd
607db91c86 spreadsheet: add more unit tests 2017-09-07 06:12:41 -04:00
Todd
982e3a4f7d spreadsheet: add methods for getting a cell's value as date/time 2017-09-07 06:12:41 -04:00
Todd
5392829790 spreadsheet: add method for retrieving cell value as a number/bool 2017-09-07 06:12:41 -04:00
Todd
80fc93a1a7 spreadsheet: add support for rich text within a cell 2017-09-06 15:20:51 -04:00
Todd
10498401d6 spreadsheet: add helpers and example for number/date/time formatting 2017-09-05 17:55:22 -05:00
Todd
70051ae509 spreadsheet: support setting date/time cell values 2017-09-05 17:55:22 -05:00
Todd
d186678dbb spreadsheet: merge spreadsheet/style package into spreadsheet 2017-09-02 17:50:38 -05:00
Todd
4bd04dd2e5 initial commit 2017-08-29 15:06:08 -05:00