504 Commits

Author SHA1 Message Date
Todd
56e9890d9f schema: round trip extra content on Workbook
Excel occasionally drops some alternate content with
path information here.
2017-10-02 18:36:49 -05:00
Todd
99ed4875e1 spreadsheet: support evaluation of shared formulas
This seems to be very uncommon.
2017-10-01 19:29:13 -05:00
Todd
968e4ba29d spreadsheet: use ParseCellReference from reference package
Drop the old cell reference parsing code and use the new code
that parses to a struct and identifies absolute references
2017-10-01 19:29:13 -05:00
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
d0820f1553 gooxml: add release info to metadata in generated files 2017-10-01 11:45:06 -05:00
Todd
46dda892ed meta: add commercial EULA for those interested 2017-10-01 11:45:06 -05:00
Todd
665d3a281d gooxml: add support for verifying versions and license 2017-10-01 11:45:06 -05:00
Todd
801388a119 gooxml: clean up some old TODOs 2017-09-30 07:09:26 -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
6cf6944f09 document: support inserting runs mid-paragraph v0.4.0 2017-09-28 19:21:07 -05:00
Todd
1b53d772ee document: support inserting paragraphs within a document 2017-09-28 18:20:56 -05:00
Todd
89b1416b8f gooxml: rework how filenames are calculated
This is needed for pivot tables, split out from that branch
so any further changes to filename handling will be easier in
master.
2017-09-28 18:20:56 -05:00
Todd
11edbae6be document: fix rewriting of images within document names
I have a better fix for filenames in the pivot table branch
that I intend to break out later.
2017-09-28 16:56:22 -05:00
Todd
2dddc86a1e spreadsheet: add test for number/string column sorting
This ensures we sort the same way Excel does.
2017-09-28 16:56:22 -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
551e748377 spreadsheet: recompute sheet dimensions prior to save 2017-09-27 18:27:53 -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
73e0a188cf example: add a document edit example
This examples shows taking an arbitrary docx and
editing/removing content from it.
2017-09-26 19:34:13 -05:00
Todd
82f22691b2 document: support removing runs/paragraphs 2017-09-26 19:34:13 -05:00
Todd
ad46a6ae15 schema: preserve extra content on CT_R/CT_SdtPr
The extra content is non-standard, but Libre seems to support
it well so we just round-trip it for now.
2017-09-26 19:34:13 -05:00
Todd
427f7b1e45 schema: rename officeDocument to ofc 2017-09-23 10:01:17 -04:00
Todd
599631208a schema: rename drawingml to dml 2017-09-23 10:01:17 -04:00
Todd
e880adfc5b schema: rename package to pkg 2017-09-23 10:01:17 -04:00
Todd
cfd74875a6 schema: rename presentationml to pml 2017-09-23 10:01:17 -04:00
Todd
ca6c54dc60 schema: rename wordprocessingml to wml 2017-09-23 10:01:17 -04: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
5553f30ada chart: add some tests
The tests aren't much, but they do execute
some functionality that should always work.
2017-09-22 21:49:48 -04:00
Todd
de75c0030e meta: test codecov.io 2017-09-22 21:49:48 -04:00
Todd
20dce01067 test: add more tests for xsdany and optional
- XSDAny
- filename generation
- optional
2017-09-22 20:58:57 -04:00
Todd
f0de9225cf spreadsheet: return errors if passed an invalid reference 2017-09-21 21:52:15 -04:00
Todd
2c0aa0c665 spreadsheet: add validation for merged cells
Detect overlapping merged cells and report an error
during validation.
2017-09-21 21:52:15 -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
c4c9138da2 formula: add more index functions
- HLOOKUP
- LOOKUP
- TRANSPOSE
- VLOOKUP
2017-09-21 19:31:28 -04:00
Todd
237685187d meta: add compile time check for go1.8+ 2017-09-21 18:32:24 -04:00
Todd
eab436cb20 meta: add minimum go version to readme 2017-09-21 18:04:12 -04:00
Todd
6a323fdea2 meta: update README 2017-09-20 20:47:39 -04:00
Todd
f915bf1a9b formula: support for more statistical functions
- AVERAGE
- AVERAGEA
- COUNT
- COUNTA
- COUNTBLANK
- MEDIAN
2017-09-20 20:47:03 -04:00
Todd
0e09e64818 formula: compatibility & bug fixes
- Make UNICODE with no arguments behave like Excel
- Fix OFFSET/INDEX for named ranges
2017-09-20 20:47:03 -04:00
Todd
e7da598399 spreadsheet: return empty values from sheet context
This is required as AVERAGE/AVERAGEA need to distinguish between
empty and non-empty cells.
2017-09-20 20:47:03 -04:00
Todd
b056033c12 format: add support for string formats 2017-09-20 15:15:13 -04:00
Todd
5f6ed3a319 spreadsheet: add unit tests for default number formats 2017-09-20 15:15:13 -04:00
Todd
6a8920a1c7 spreadsheet: fix number format 47
This appears to be a typo in the ECMA 376 document.  Excel treats
it as "mm:ss.0" and not "mmss.0"
2017-09-20 15:15:13 -04:00
Todd
1992e3c519 format: support variable denominators in fraction formats 2017-09-20 15:15:13 -04:00
Todd
87842baff2 demo: add an unprotect-xlsx demo that will unprotect an XLSX
This demo will remove both the workbook and individual sheet
protections.
2017-09-20 15:15:13 -04:00
Todd
a8d038561c spreadsheet: add support for protecting/unprotecting workbooks/sheets 2017-09-20 15:15:13 -04:00
Todd
981b0b205c demo: add csv2xlsx demo program 2017-09-19 21:17:33 -04:00