40 Commits

Author SHA1 Message Date
Todd
76cd395f6a spreadsheet: clear temp files when closing sheets
We don't bother keeping all files in memory as there
can be several, and we don't need them all.  This just
adds a Close() method that can be used to ensure the
temporary files are removed.
2017-10-02 18:36:49 -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
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
551e748377 spreadsheet: recompute sheet dimensions prior to save 2017-09-27 18:27:53 -05: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
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
a8d038561c spreadsheet: add support for protecting/unprotecting workbooks/sheets 2017-09-20 15:15:13 -04:00
Todd
39028bcd7a spreadsheet: add ability to recalculate formulas
If the formula executes without errors, it stores the
result as a cached value in the sheet.
2017-09-17 14:56:58 -05:00
Todd
a4a1562f7c spreadsheet: add formula reading/writing support
Minimal support for now, just enough to read table
ranges so they can be used from formulas.
2017-09-17 14:56:58 -05:00
Todd
e46a7165b4 formula: more implementations of math/trig functins
- MDETERM
- MOD
- MROUND
- MULTINOMIAL
- MUNIT
- ODD
- POWER
- PRODUCT
- QUOTIENT
- RADIANS
- RAND
- RANDBETWEEN
- ROMAN
- ROUND
- ROUNDDOWN
- ROUNDUP
- SERIESSUM
2017-09-16 16:52:14 -05:00
Todd
5a5c16b89a formula: add initial support for cell arrays
This is a pretty uncommon feature from what I can tell
and is not fully supported. The example for the MDETERM
function uses an array though, so this will at least add
enough support for the examples to compute correctly.
2017-09-16 16:52:14 -05:00
Todd
1ff1b074f7 spreadsheet: add support for setting the active sheet
This is the tab that is initially selected when opening
a spreadsheet.
2017-09-12 16:32:16 -05:00
Todd
558e5ee274 spreadsheet: add image support and example 2017-09-11 20:17:06 -05:00
Todd
9e6bfaf6e1 spreadsheet: add method to clear cached formula results 2017-09-10 17:28:36 -05:00
Todd
3bc4675cf6 spreadsheet: add comment support
This adds comment support for sheets.  Excel requires a VML drawing with
the comment box shape for each comment to display the comment.
LibreOffice displays comments fine with or without the shape, and
creates the shape for its own comments.  For the sake of compatibility,
we create comment shapes as well.

I know of no other use for the legacy VML support other than comment
boxes...
2017-09-10 11:25:29 -05:00
Todd
41e2d6eaec document: add support for rewriting document filenames
The problem this solves is loading and re-saving a document
that uses an odd file structure (e.g. the main body is
not at word/document.xml).  I've seen this occur with spreadsheets
but not with a docx in the wild, however it's fairly simple
to handle in case it occurs.
2017-09-08 18:30:40 -04:00
Todd
f70810321d spreadsheet: support adding/removing an auto filter 2017-09-07 16:39:40 -04:00
Todd
d8554f54de spreadsheet: fix bug when saving sheets loaded with themes 2017-09-07 12:44:31 -04:00
Todd
03540b8c38 spreadsheet: add support for defined names 2017-09-07 07:34:52 -04:00
Todd
7e0d2edaab spreadsheet: add support for named cells/rows 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
7562c4e7bb spreadsheet: provide an Epoch for dealing with older spreadsheets 2017-09-05 17:55:22 -05:00
Todd
cd10a33f30 spreadsheet: improve Excel compatibility
Mac Excel apparently doesn't like empty drawing
relationships file.
2017-09-05 10:01:28 -05:00
Todd
f91f68b26a spreadsheet: rename InitializeDefault to InitializeDefaults 2017-09-04 15:01:14 -05:00
Todd
b19266aced spreadsheet: initial fixes for Mac Excel 2017-09-04 15:01:14 -05:00
Todd
f959cb0c9f spreadsheet: working line chart
- needs major cleanup, but it displays in Libre
2017-09-04 11:08:29 -05:00
Todd
0dae44f002 chart, drawing: start adding chart & drawing support
- Created chart, drawing packages for the chart/drawing stuff common
  between document type
- Need to go back and clean up any drawing related document types after
2017-09-04 11:08:29 -05:00
Todd
9090e4f93c meta: move filename information out of packages
This seems like the better choice, a lot of the logic is shared
between the document types, and it allows generating filenames in
a single place.

The only downside is that you must pass in the document type as
some content types have different typical names depending on the
document type (e.g. an 'office document' is the main document.xml,
workbook.xml and presentation.xml
2017-09-04 11:08:29 -05:00
Todd
f07c57cae7 gooxml: move content types to base package 2017-09-04 11:08:29 -05:00
Todd
74a59930f2 spreadsheet: write out charts/drawings 2017-09-04 11:08:29 -05:00
Todd
6164089457 zippkg: start breaking out decoding
Decoding was getting fairly complicated, it seems cleaner
to have something handle the relationships file and traversal
and the document just be notified via callback when new
files have been found.
2017-09-04 11:08:29 -05:00
Todd
ef0d194ae2 spreadsheet: fix issue loading spreadsheets with non-standard naming 2017-09-02 17:50:38 -05:00
Todd
13820691e2 spreadsheet: save worksheet relationships 2017-09-02 17:50:38 -05:00
Todd
a06fea99f7 spreadsheet: add saving/loading of themes 2017-09-02 17:50:38 -05:00
Todd
8f45ea019b spreadsheet: add thumbnail support 2017-09-02 17:50:38 -05:00
Todd
d186678dbb spreadsheet: merge spreadsheet/style package into spreadsheet 2017-09-02 17:50:38 -05:00
Todd
d1d718b734 spreadsheet: add validation check for reused sheet names 2017-09-02 17:50:38 -05:00
Todd
4bd04dd2e5 initial commit 2017-08-29 15:06:08 -05:00