You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+45-17Lines changed: 45 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,36 +8,64 @@ and latest features from
8
8
9
9
Why?
10
10
-----------
11
-
Some features of underlying library that I need are missing in this plugin or not implemented as I want,
11
+
Some Excel features of underlying library that I need are missing in this plugin or not implemented as I want,
12
12
like pages, column styling, etc.
13
13
Also, I'm still working with grails 2, but latest features of 2.0.0, that works only with Grails3, are not merged back to Grails2 version...
14
14
So, first commit of this branch is a pure merge of dead 1.7 and latest 2.0.0.
15
-
A new branch will be spawned for every upgrade of base line (if it ever happends at all).
15
+
A new branch will be spawned for every upgrade of base line (if it ever happens at all).
16
16
17
17
What are the new features?
18
18
-----------
19
-
1.7-2.0.0-2:
20
-
- I see no reason why column autosizing is not turned-on by default: it perfectly resizes small columns, and doesn't resize large collumns too much. So it's on by default now. To disable it set ```Map parameters=['column.width.autoSize':false]```
21
-
- supports column formating. Here is a quick example how to assign "currenty" type to a column:
22
-
```groovy
23
-
Map labels = ['paymentAmt':'Payment Amount']
24
-
List fields = ['paymentAmt']
25
-
Map parameters = ["column.formats": [paymentAmt: new WritableCellFormat(NumberFormats.ACCOUNTING_FLOAT)]]
def cellFormat = (new ExcelFormat()).TAHOMA().bold().noBold().struckout().VIOLET().italic().pointSize(10).wrapText().CENTRE().TOP().MINUS_45().backColor(Colour.AQUA).MIDDLE()
23
+
```
24
+
It is possible to set that format for all headers ```"header.format":format``` and/or individually ```"header.formats": [1:column1headerFormat,5:column5headerFormat]```
25
+
- Change column size individually ```"column.widths": [null, 40]``` - here we set it only for second one, the rest will be autosized.
26
+
- format can handle cell value type (currency bundles text formatter as well!):
27
+
```
28
+
def textFormat = new ExcelFormat()
29
+
def currencyFormat = new ExcelFormat(NumberFormats.ACCOUNTING_FLOAT)
30
+
def dateTimeFormat = new ExcelFormat(DateFormats.FORMAT9)
31
+
```
32
+
- new interface to handle multiple sheets (only Excel implemented for now):
- I see no reason why column autosizing is not turned-on by default: it perfectly resizes small columns, and doesn't resize large columns too much. So it's on by default now. To disable it set ```Map parameters=['column.width.autoSize':false]```
47
+
- supports column formating. Here is a quick example how to assign "currency" type to a column:
48
+
```groovy
49
+
Map labels = ['paymentAmt':'Payment Amount']
50
+
List fields = ['paymentAmt']
51
+
Map parameters = ['column.formats': ['paymentAmt': new WritableCellFormat(NumberFormats.ACCOUNTING_FLOAT)]]
52
+
def formatters = ['paymentAmt' : { domain, value ->
0 commit comments