58 Commits

Author SHA1 Message Date
Vyacheslav Zgordan
188f7c6a30
Merge branch 'development' into playground 2020-07-08 16:48:47 +03:00
Vyacheslav Zgordan
49a017c59e tests and examples fixed, finalizers removed 2020-07-08 15:52:48 +03:00
Vyacheslav Zgordan
0f98a7e893
Resolve UO-27, UO-28, UO-31 (#407)
* Fixes in CI (#406)

* Create .gitattributes

* Update .travis.yml

* Update .travis.yml

* travis fix

* only errors are printed in travis log

* spreadsheet errors fixed: duplicate ID in non-visual properties and lack of third axis in an example

* set-strict example fix

* build-examples.sh exits with error status in the case of build error

* redundant command deleted from script

* unneeded image relationships removed

* pptx validation errors fixes

* all output to travis

Co-authored-by: Gunnsteinn Hall <gunnsteinn.hall@gmail.com>
2020-06-23 09:24:02 +00:00
Vyacheslav Zgordan
183bd3c21b
Playground (#381)
* Fixes for being able to compile with playground

* disk storage replaced for in-memory storage

* CustomProperties is added to presentations and workbooks

* custom properties fix

* custom properties removed redundant code

* write to temp storage error fixed

* var names consistency

* storage as interface

* interfaces

* fixes

* fixes 2

* Note is added

* finalizers
2020-04-24 12:01:19 +00:00
Vyacheslav Zgordan
72ad869a28
Get all cells in a row with empty ones (#377)
* Get all cells in a row with empty ones
* sheet.MaxColumnIdx() changed
* goimports for all
2020-03-25 13:40:25 +00:00
Vyacheslav Zgordan
a5ef37c0bc
Spreadsheet formulas: Flattening files (#366)
* evaluation errors fixed
* allow underscores in sheet names
* allow wildcard in *LOOKUP functions
* horizontal and vertical ranges
* horizontal and vertical ranges for sheet references
* remove redundant recalculate
* caching
* fixed named ranges, made Evaluator more generic
* Memory usage shown in flatten example
* temporary file deleted
* ParseCellReference duplicate removed
* ISREF is fixed
2020-01-29 10:43:43 +00:00
Vyacheslav Zgordan
055ebf0f4c Excel spreadsheet functions, part 3 (#351)
* fixed IF and statistical functions
* Issue #347
* DATETIME
* DAY, DAYS, Cells() fix
* MONTH
* MINUTE
* EDATE
* EOMONTH
2019-12-02 16:25:18 +00:00
Vyacheslav Zgordan
dd7713e1e3 Functions2 (#348)
* MATCH, IFS, MAXA, MINA
* OFFSET fixed
* ISBLANK, ISERR, ISERROR, ISEVEN ,ISFORMULA, ISNONTEXT, ISNUMBER, ISODD, ISTEXT
* ISLEAPYEAR, ISLOGICAL, ISNA, ISREF
* FIND, FINDB
* SEARCH, SEARCHB
* CONCAT, CONCATENATE
* YEAR, YEARFRAC
* CONCAT is fixed, now TRUE and FALSE are concatenated instead of 1 and 0 in case of boolean results
* NOW, TODAY, TIME, TIMEVALUE
* DATE
* DATEDIF
2019-11-20 23:21:00 +00:00
Vyacheslav Zgordan
415c045839 Spreadsheed Formula Functions (#345)
* CELL function
* CELL moved to fninformation.go
* CHOOSE function
* CHOOSE function add one test
* COLUMN function
* COLUMNS function
* COUNTIF function
* COUNTIF, COUNTIFS, MINIFS, MAXIFS, SUMIF, SUMIFS, some style fixes
* SUMIF and SUMIFS moved to the right location
* VALUE function
* wildcard is added
* CELL format fix
2019-11-05 16:36:09 +00:00
Vyacheslav Zgordan
2bd51b004c watermarks for spreadsheets and presentations (#335) 2019-10-10 11:26:10 +00:00
Vyacheslav Zgordan
d351975af1 Baliance replaced for FoxyUtils ehf in License information (#312) 2019-07-25 16:43:46 +00:00
Marc Coury
c6ab0e98df Add images from bytes for presentation and workbook (#295) 2019-07-02 14:54:55 +00:00
Nikita Kryuchkov
9b742a3505 Fix comment on the AddSheet (#299) 2019-06-17 18:27:10 +00:00
Nikita Kryuchkov
1783b652de Functions to copy and remove sheets (#281)
* Add funcs to remove sheet from workbook
- RemoveSheet added to remove sheet by index
- RemoveSheetByName added to remove sheet by its name
* Add `CopyRelationship` func to `Relationships`
* Add funcs `CopySheet`, `CopySheetByName`
- `CopySheet` copies sheet at the specified index
- `CopySheetByName` copies sheet with the specified name
* Make `CopyRelationship` return copied rel and bool flag
* Add func `CopyOverride` to `ContentTypes`
* Add test for `CopyRelationship`
* Add tests for sheet removing funcs
* Add test for `CopyOverride`
* Add tests for `CopySheet`, `CopySheetByName`
2019-05-12 12:12:11 +00:00
Gunnsteinn Hall
270664ca01
Rename package name to unioffice (#274) 2019-05-04 13:54:29 +00:00
Nikita Kryuchkov
e8bf6a3bb9 Move repository https://github.com/baliance/gooxml to https://github.com/unidoc/unioffice (#273) 2019-05-04 08:18:06 +00:00
Tom Weber
b746aceced Image from data (#251)
* ability to create image from in-memory data

* gitignore: vim swap files
2019-03-29 16:26:51 +00:00
Todd
4f678e9952 spreadsheet: add a RemoveCalcChain function
This allows removing the cached calculation change which
can contain bad data if rows are inserted/removed.

Fixes #215
2018-10-17 17:11:41 -05:00
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