surpass 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +4 -0
- data/README.txt +3 -20
- data/Rakefile +2 -13
- data/bin/surpass +8 -0
- data/examples/big-16mb.rb +25 -0
- data/examples/big-random-strings.rb +28 -0
- data/examples/blanks.rb +34 -0
- data/examples/blanks.xls +0 -0
- data/examples/col_width.rb +16 -0
- data/examples/col_width.xls +0 -0
- data/examples/dates.rb +31 -0
- data/examples/dates.xls +0 -0
- data/examples/format.rb +23 -0
- data/examples/format.xls +0 -0
- data/examples/hello-world.rb +9 -0
- data/examples/hello-world.xls +0 -0
- data/examples/image.rb +10 -0
- data/examples/image.xls +0 -0
- data/examples/merged.rb +36 -0
- data/examples/merged.xls +0 -0
- data/examples/merged0.rb +27 -0
- data/examples/merged0.xls +0 -0
- data/examples/merged1.rb +99 -0
- data/examples/merged1.xls +0 -0
- data/examples/num_formats.rb +55 -0
- data/examples/num_formats.xls +0 -0
- data/examples/numbers.rb +24 -0
- data/examples/numbers.xls +0 -0
- data/examples/outline.rb +110 -0
- data/examples/outline.xls +0 -0
- data/examples/panes.rb +48 -0
- data/examples/panes.xls +0 -0
- data/examples/protection.rb +132 -0
- data/examples/protection.xls +0 -0
- data/examples/python.bmp +0 -0
- data/examples/row_styles.rb +16 -0
- data/examples/row_styles.xls +0 -0
- data/examples/row_styles_empty.rb +15 -0
- data/examples/row_styles_empty.xls +0 -0
- data/examples/set_cell_and_range_style.rb +12 -0
- data/examples/set_cell_and_range_style.xls +0 -0
- data/examples/wrapped-text.rb +13 -0
- data/examples/wrapped-text.xls +0 -0
- data/examples/write_arrays.rb +22 -0
- data/examples/write_arrays.xls +0 -0
- data/examples/ws_props.rb +80 -0
- data/lib/surpass/ExcelFormula.g +366 -0
- data/lib/surpass/ExcelFormula.tokens +30 -0
- data/lib/surpass/ExcelFormulaLexer.rb +922 -0
- data/lib/surpass/ExcelFormulaParser.rb +602 -0
- data/lib/{biff_record.rb → surpass/biff_record.rb} +0 -0
- data/lib/{bitmap.rb → surpass/bitmap.rb} +0 -0
- data/lib/{cell.rb → surpass/cell.rb} +2 -34
- data/lib/{chart.rb → surpass/chart.rb} +0 -0
- data/lib/{column.rb → surpass/column.rb} +0 -0
- data/lib/{document.rb → surpass/document.rb} +0 -0
- data/lib/surpass/excel_formula.rb +23 -0
- data/lib/{excel_magic.rb → surpass/excel_magic.rb} +0 -0
- data/lib/{formatting.rb → surpass/formatting.rb} +93 -53
- data/lib/{row.rb → surpass/row.rb} +0 -0
- data/lib/{style.rb → surpass/style.rb} +2 -1
- data/lib/surpass/tokens.txt +2 -0
- data/lib/{utilities.rb → surpass/utilities.rb} +0 -0
- data/lib/{workbook.rb → surpass/workbook.rb} +0 -0
- data/lib/{worksheet.rb → surpass/worksheet.rb} +15 -6
- data/lib/surpass.rb +1 -1
- data/spec/biff_record_spec.rb +268 -0
- data/spec/cell_spec.rb +56 -0
- data/spec/data/random-strings.txt +10000 -0
- data/spec/document_spec.rb +168 -0
- data/spec/excel_formula_spec.rb +27 -0
- data/spec/formatting_spec.rb +53 -0
- data/spec/output/cells-rk.xls +0 -0
- data/spec/output/cells.xls +0 -0
- data/spec/output/mini.xls +0 -0
- data/spec/reference/P-0508-0000507647-3280-5298.xls +0 -0
- data/spec/reference/all-cell-styles.bin +0 -0
- data/spec/reference/all-number-formats.bin +0 -0
- data/spec/reference/all-styles.bin +0 -0
- data/spec/reference/mini.xls +0 -0
- data/spec/row_spec.rb +19 -0
- data/spec/spec_helper.rb +10 -0
- data/spec/style_spec.rb +89 -0
- data/spec/surpass_spec.rb +7 -0
- data/spec/utilities_spec.rb +57 -0
- data/spec/workbook_spec.rb +48 -0
- data/spec/worksheet_spec.rb +0 -0
- data/stats/cloc.txt +8 -0
- data/stats/rcov.txt +0 -0
- data/stats/specdoc.txt +158 -0
- data/surpass.gemspec +40 -0
- data/tasks/setup.rb +1 -1
- data/tasks/zentest.rake +36 -0
- data/webby/README.txt +6 -0
- data/webby/Sitefile +43 -0
- data/webby/content/css/pygments.txt +6 -0
- data/webby/content/css/style.css +279 -0
- data/webby/content/examples/autoformat.png +0 -0
- data/webby/content/examples/autoformat.rb +32 -0
- data/webby/content/examples/autoformat.xls +0 -0
- data/webby/content/examples/borders.png +0 -0
- data/webby/content/examples/borders.rb +15 -0
- data/webby/content/examples/borders.xls +0 -0
- data/webby/content/examples/colours.png +0 -0
- data/webby/content/examples/colours.rb +23 -0
- data/webby/content/examples/colours.xls +0 -0
- data/webby/content/examples/data.png +0 -0
- data/webby/content/examples/data.rb +11 -0
- data/webby/content/examples/data.xls +0 -0
- data/webby/content/examples/formatting.png +0 -0
- data/webby/content/examples/formatting.rb +78 -0
- data/webby/content/examples/formatting.xls +0 -0
- data/webby/content/examples/hello-world.png +0 -0
- data/webby/content/examples/hello-world.py +8 -0
- data/webby/content/examples/hello-world.rb +9 -0
- data/webby/content/examples/hello-world.xls +0 -0
- data/webby/content/examples/number-format-string.png +0 -0
- data/webby/content/examples/number-format-string.rb +14 -0
- data/webby/content/examples/number-format-string.xls +0 -0
- data/webby/content/examples/patterns.png +0 -0
- data/webby/content/examples/patterns.rb +26 -0
- data/webby/content/examples/patterns.xls +0 -0
- data/webby/content/examples/show-greens.sh +1 -0
- data/webby/content/examples/surpass-info.sh +1 -0
- data/webby/content/img/Thumbs.db +0 -0
- data/webby/content/img/bg_menu.gif +0 -0
- data/webby/content/img/bg_t.gif +0 -0
- data/webby/content/img/bullet.gif +0 -0
- data/webby/content/img/logo.png +0 -0
- data/webby/content/img/logo_.jpg +0 -0
- data/webby/content/img/top_bg.gif +0 -0
- data/webby/content/img/top_bg_.gif +0 -0
- data/webby/content/index.txt +16 -0
- data/webby/content/installation/index.txt +24 -0
- data/webby/content/source/ExcelFormulaLexer.txt +7 -0
- data/webby/content/source/ExcelFormulaParser.txt +7 -0
- data/webby/content/source/biff_record.txt +7 -0
- data/webby/content/source/bitmap.txt +7 -0
- data/webby/content/source/cell.txt +7 -0
- data/webby/content/source/chart.txt +7 -0
- data/webby/content/source/column.txt +7 -0
- data/webby/content/source/document.txt +7 -0
- data/webby/content/source/excel_formula.txt +7 -0
- data/webby/content/source/excel_magic.txt +7 -0
- data/webby/content/source/formatting.txt +7 -0
- data/webby/content/source/row.txt +7 -0
- data/webby/content/source/style.txt +7 -0
- data/webby/content/source/utilities.txt +7 -0
- data/webby/content/source/workbook.txt +7 -0
- data/webby/content/source/worksheet.txt +7 -0
- data/webby/content/surpass-manual.erb +198 -0
- data/webby/layouts/book.txt +29 -0
- data/webby/layouts/default.txt +27 -0
- data/webby/layouts/two_column.txt +25 -0
- data/webby/layouts/web.txt +66 -0
- data/webby/output/.cairn +0 -0
- data/webby/output/css/blueprint/ie.css +26 -0
- data/webby/output/css/blueprint/plugins/buttons/icons/cross.png +0 -0
- data/webby/output/css/blueprint/plugins/buttons/icons/key.png +0 -0
- data/webby/output/css/blueprint/plugins/buttons/icons/tick.png +0 -0
- data/webby/output/css/blueprint/plugins/buttons/readme.txt +32 -0
- data/webby/output/css/blueprint/plugins/buttons/screen.css +97 -0
- data/webby/output/css/blueprint/plugins/fancy-type/readme.txt +14 -0
- data/webby/output/css/blueprint/plugins/fancy-type/screen.css +71 -0
- data/webby/output/css/blueprint/plugins/link-icons/icons/doc.png +0 -0
- data/webby/output/css/blueprint/plugins/link-icons/icons/email.png +0 -0
- data/webby/output/css/blueprint/plugins/link-icons/icons/external.png +0 -0
- data/webby/output/css/blueprint/plugins/link-icons/icons/feed.png +0 -0
- data/webby/output/css/blueprint/plugins/link-icons/icons/im.png +0 -0
- data/webby/output/css/blueprint/plugins/link-icons/icons/pdf.png +0 -0
- data/webby/output/css/blueprint/plugins/link-icons/icons/visited.png +0 -0
- data/webby/output/css/blueprint/plugins/link-icons/icons/xls.png +0 -0
- data/webby/output/css/blueprint/plugins/link-icons/readme.txt +18 -0
- data/webby/output/css/blueprint/plugins/link-icons/screen.css +40 -0
- data/webby/output/css/blueprint/plugins/rtl/readme.txt +10 -0
- data/webby/output/css/blueprint/plugins/rtl/screen.css +109 -0
- data/webby/output/css/blueprint/print.css +30 -0
- data/webby/output/css/blueprint/screen.css +251 -0
- data/webby/output/css/blueprint/src/forms.css +49 -0
- data/webby/output/css/blueprint/src/grid.css +212 -0
- data/webby/output/css/blueprint/src/grid.png +0 -0
- data/webby/output/css/blueprint/src/ie.css +59 -0
- data/webby/output/css/blueprint/src/print.css +85 -0
- data/webby/output/css/blueprint/src/reset.css +38 -0
- data/webby/output/css/blueprint/src/typography.css +105 -0
- data/webby/output/css/pygments.css +59 -0
- data/webby/output/css/site.css +62 -0
- data/webby/output/css/style.css +279 -0
- data/webby/output/examples/autoformat.png +0 -0
- data/webby/output/examples/autoformat.rb +32 -0
- data/webby/output/examples/autoformat.xls +0 -0
- data/webby/output/examples/borders.png +0 -0
- data/webby/output/examples/borders.rb +15 -0
- data/webby/output/examples/borders.xls +0 -0
- data/webby/output/examples/colours.png +0 -0
- data/webby/output/examples/colours.rb +23 -0
- data/webby/output/examples/colours.xls +0 -0
- data/webby/output/examples/data.png +0 -0
- data/webby/output/examples/data.rb +11 -0
- data/webby/output/examples/data.xls +0 -0
- data/webby/output/examples/formatting.png +0 -0
- data/webby/output/examples/formatting.rb +78 -0
- data/webby/output/examples/formatting.xls +0 -0
- data/webby/output/examples/hello-world.png +0 -0
- data/webby/output/examples/hello-world.py +8 -0
- data/webby/output/examples/hello-world.rb +9 -0
- data/webby/output/examples/hello-world.xls +0 -0
- data/webby/output/examples/number-format-string.png +0 -0
- data/webby/output/examples/number-format-string.rb +14 -0
- data/webby/output/examples/number-format-string.xls +0 -0
- data/webby/output/examples/patterns.png +0 -0
- data/webby/output/examples/patterns.rb +26 -0
- data/webby/output/examples/patterns.xls +0 -0
- data/webby/output/examples/show-greens.sh +1 -0
- data/webby/output/examples/surpass-info.sh +1 -0
- data/webby/output/img/Thumbs.db +0 -0
- data/webby/output/img/bg_menu.gif +0 -0
- data/webby/output/img/bg_t.gif +0 -0
- data/webby/output/img/bullet.gif +0 -0
- data/webby/output/img/logo.png +0 -0
- data/webby/output/img/logo_.jpg +0 -0
- data/webby/output/img/top_bg.gif +0 -0
- data/webby/output/img/top_bg_.gif +0 -0
- data/webby/output/index.html +138 -0
- data/webby/output/installation/index.html +64 -0
- data/webby/output/installation/installation.html +1 -0
- data/webby/output/installation.html +1 -0
- data/webby/output/source/ExcelFormulaLexer.html +981 -0
- data/webby/output/source/ExcelFormulaParser.html +661 -0
- data/webby/output/source/biff_record.html +462 -0
- data/webby/output/source/bitmap.html +277 -0
- data/webby/output/source/cell.html +241 -0
- data/webby/output/source/chart.html +64 -0
- data/webby/output/source/column.html +99 -0
- data/webby/output/source/document.html +465 -0
- data/webby/output/source/excel_formula.html +82 -0
- data/webby/output/source/excel_magic.html +1072 -0
- data/webby/output/source/formatting.html +664 -0
- data/webby/output/source/row.html +169 -0
- data/webby/output/source/style.html +158 -0
- data/webby/output/source/surpass.html +110 -0
- data/webby/output/source/utilities.html +145 -0
- data/webby/output/source/workbook.html +265 -0
- data/webby/output/source/worksheet.html +331 -0
- data/webby/output/surpass-manual-0-0-5.pdf +0 -0
- data/webby/output/surpass-manual.aux +50 -0
- data/webby/output/surpass-manual.log +366 -0
- data/webby/output/surpass-manual.out +20 -0
- data/webby/output/surpass-manual.tex +582 -0
- data/webby/output/surpass-manual.toc +20 -0
- data/webby/rsync-exclude +7 -0
- data/webby/tasks/latex.rake +14 -0
- data/webby/tasks/screenshots.rb +58 -0
- data/webby/templates/article.erb +15 -0
- data/webby/templates/book.erb +16 -0
- data/webby/templates/page.erb +9 -0
- metadata +302 -24
- data/bin/surpass-info +0 -20
- data/lib/excel_formula.rb +0 -6
@@ -0,0 +1,105 @@
|
|
1
|
+
/* --------------------------------------------------------------
|
2
|
+
|
3
|
+
typography.css
|
4
|
+
* Sets up some sensible default typography.
|
5
|
+
|
6
|
+
-------------------------------------------------------------- */
|
7
|
+
|
8
|
+
/* Default font settings.
|
9
|
+
The font-size percentage is of 16px. (0.75 * 16px = 12px) */
|
10
|
+
body {
|
11
|
+
font-size: 75%;
|
12
|
+
color: #222;
|
13
|
+
background: #fff;
|
14
|
+
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
|
15
|
+
}
|
16
|
+
|
17
|
+
|
18
|
+
/* Headings
|
19
|
+
-------------------------------------------------------------- */
|
20
|
+
|
21
|
+
h1,h2,h3,h4,h5,h6 { font-weight: normal; color: #111; }
|
22
|
+
|
23
|
+
h1 { font-size: 3em; line-height: 1; margin-bottom: 0.5em; }
|
24
|
+
h2 { font-size: 2em; margin-bottom: 0.75em; }
|
25
|
+
h3 { font-size: 1.5em; line-height: 1; margin-bottom: 1em; }
|
26
|
+
h4 { font-size: 1.2em; line-height: 1.25; margin-bottom: 1.25em; }
|
27
|
+
h5 { font-size: 1em; font-weight: bold; margin-bottom: 1.5em; }
|
28
|
+
h6 { font-size: 1em; font-weight: bold; }
|
29
|
+
|
30
|
+
h1 img, h2 img, h3 img,
|
31
|
+
h4 img, h5 img, h6 img {
|
32
|
+
margin: 0;
|
33
|
+
}
|
34
|
+
|
35
|
+
|
36
|
+
/* Text elements
|
37
|
+
-------------------------------------------------------------- */
|
38
|
+
|
39
|
+
p { margin: 0 0 1.5em; }
|
40
|
+
p img.left { float: left; margin: 1.5em 1.5em 1.5em 0; padding: 0; }
|
41
|
+
p img.right { float: right; margin: 1.5em 0 1.5em 1.5em; }
|
42
|
+
|
43
|
+
a:focus,
|
44
|
+
a:hover { color: #000; }
|
45
|
+
a { color: #009; text-decoration: underline; }
|
46
|
+
|
47
|
+
blockquote { margin: 1.5em; color: #666; font-style: italic; }
|
48
|
+
strong { font-weight: bold; }
|
49
|
+
em,dfn { font-style: italic; }
|
50
|
+
dfn { font-weight: bold; }
|
51
|
+
sup, sub { line-height: 0; }
|
52
|
+
|
53
|
+
abbr,
|
54
|
+
acronym { border-bottom: 1px dotted #666; }
|
55
|
+
address { margin: 0 0 1.5em; font-style: italic; }
|
56
|
+
del { color:#666; }
|
57
|
+
|
58
|
+
pre { margin: 1.5em 0; white-space: pre; }
|
59
|
+
pre,code,tt { font: 1em 'andale mono', 'lucida console', monospace; line-height: 1.5; }
|
60
|
+
|
61
|
+
|
62
|
+
/* Lists
|
63
|
+
-------------------------------------------------------------- */
|
64
|
+
|
65
|
+
li ul,
|
66
|
+
li ol { margin:0 1.5em; }
|
67
|
+
ul, ol { margin: 0 1.5em 1.5em 1.5em; }
|
68
|
+
|
69
|
+
ul { list-style-type: disc; }
|
70
|
+
ol { list-style-type: decimal; }
|
71
|
+
|
72
|
+
dl { margin: 0 0 1.5em 0; }
|
73
|
+
dl dt { font-weight: bold; }
|
74
|
+
dd { margin-left: 1.5em;}
|
75
|
+
|
76
|
+
|
77
|
+
/* Tables
|
78
|
+
-------------------------------------------------------------- */
|
79
|
+
|
80
|
+
table { margin-bottom: 1.4em; width:100%; }
|
81
|
+
th { font-weight: bold; }
|
82
|
+
thead th { background: #c3d9ff; }
|
83
|
+
th,td,caption { padding: 4px 10px 4px 5px; }
|
84
|
+
tr.even td { background: #e5ecf9; }
|
85
|
+
tfoot { font-style: italic; }
|
86
|
+
caption { background: #eee; }
|
87
|
+
|
88
|
+
|
89
|
+
/* Misc classes
|
90
|
+
-------------------------------------------------------------- */
|
91
|
+
|
92
|
+
.small { font-size: .8em; margin-bottom: 1.875em; line-height: 1.875em; }
|
93
|
+
.large { font-size: 1.2em; line-height: 2.5em; margin-bottom: 1.25em; }
|
94
|
+
.hide { display: none; }
|
95
|
+
|
96
|
+
.quiet { color: #666; }
|
97
|
+
.loud { color: #000; }
|
98
|
+
.highlight { background:#ff0; }
|
99
|
+
.added { background:#060; color: #fff; }
|
100
|
+
.removed { background:#900; color: #fff; }
|
101
|
+
|
102
|
+
.first { margin-left:0; padding-left:0; }
|
103
|
+
.last { margin-right:0; padding-right:0; }
|
104
|
+
.top { margin-top:0; padding-top:0; }
|
105
|
+
.bottom { margin-bottom:0; padding-bottom:0; }
|
@@ -0,0 +1,59 @@
|
|
1
|
+
.hll { background-color: #ffffcc }
|
2
|
+
.c { color: #228B22 } /* Comment */
|
3
|
+
.err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
4
|
+
.k { color: #8B008B; font-weight: bold } /* Keyword */
|
5
|
+
.cm { color: #228B22 } /* Comment.Multiline */
|
6
|
+
.cp { color: #1e889b } /* Comment.Preproc */
|
7
|
+
.c1 { color: #228B22 } /* Comment.Single */
|
8
|
+
.cs { color: #8B008B; font-weight: bold } /* Comment.Special */
|
9
|
+
.gd { color: #aa0000 } /* Generic.Deleted */
|
10
|
+
.ge { font-style: italic } /* Generic.Emph */
|
11
|
+
.gr { color: #aa0000 } /* Generic.Error */
|
12
|
+
.gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
13
|
+
.gi { color: #00aa00 } /* Generic.Inserted */
|
14
|
+
.go { color: #888888 } /* Generic.Output */
|
15
|
+
.gp { color: #555555 } /* Generic.Prompt */
|
16
|
+
.gs { font-weight: bold } /* Generic.Strong */
|
17
|
+
.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
18
|
+
.gt { color: #aa0000 } /* Generic.Traceback */
|
19
|
+
.kc { color: #8B008B; font-weight: bold } /* Keyword.Constant */
|
20
|
+
.kd { color: #8B008B; font-weight: bold } /* Keyword.Declaration */
|
21
|
+
.kn { color: #8B008B; font-weight: bold } /* Keyword.Namespace */
|
22
|
+
.kp { color: #8B008B; font-weight: bold } /* Keyword.Pseudo */
|
23
|
+
.kr { color: #8B008B; font-weight: bold } /* Keyword.Reserved */
|
24
|
+
.kt { color: #a7a7a7; font-weight: bold } /* Keyword.Type */
|
25
|
+
.m { color: #B452CD } /* Literal.Number */
|
26
|
+
.s { color: #CD5555 } /* Literal.String */
|
27
|
+
.na { color: #658b00 } /* Name.Attribute */
|
28
|
+
.nb { color: #658b00 } /* Name.Builtin */
|
29
|
+
.nc { color: #008b45; font-weight: bold } /* Name.Class */
|
30
|
+
.no { color: #00688B } /* Name.Constant */
|
31
|
+
.nd { color: #707a7c } /* Name.Decorator */
|
32
|
+
.ne { color: #008b45; font-weight: bold } /* Name.Exception */
|
33
|
+
.nf { color: #008b45 } /* Name.Function */
|
34
|
+
.nn { color: #008b45; text-decoration: underline } /* Name.Namespace */
|
35
|
+
.nt { color: #8B008B; font-weight: bold } /* Name.Tag */
|
36
|
+
.nv { color: #00688B } /* Name.Variable */
|
37
|
+
.ow { color: #8B008B } /* Operator.Word */
|
38
|
+
.w { color: #bbbbbb } /* Text.Whitespace */
|
39
|
+
.mf { color: #B452CD } /* Literal.Number.Float */
|
40
|
+
.mh { color: #B452CD } /* Literal.Number.Hex */
|
41
|
+
.mi { color: #B452CD } /* Literal.Number.Integer */
|
42
|
+
.mo { color: #B452CD } /* Literal.Number.Oct */
|
43
|
+
.sb { color: #CD5555 } /* Literal.String.Backtick */
|
44
|
+
.sc { color: #CD5555 } /* Literal.String.Char */
|
45
|
+
.sd { color: #CD5555 } /* Literal.String.Doc */
|
46
|
+
.s2 { color: #CD5555 } /* Literal.String.Double */
|
47
|
+
.se { color: #CD5555 } /* Literal.String.Escape */
|
48
|
+
.sh { color: #1c7e71; font-style: italic } /* Literal.String.Heredoc */
|
49
|
+
.si { color: #CD5555 } /* Literal.String.Interpol */
|
50
|
+
.sx { color: #cb6c20 } /* Literal.String.Other */
|
51
|
+
.sr { color: #1c7e71 } /* Literal.String.Regex */
|
52
|
+
.s1 { color: #CD5555 } /* Literal.String.Single */
|
53
|
+
.ss { color: #CD5555 } /* Literal.String.Symbol */
|
54
|
+
.bp { color: #658b00 } /* Name.Builtin.Pseudo */
|
55
|
+
.vc { color: #00688B } /* Name.Variable.Class */
|
56
|
+
.vg { color: #00688B } /* Name.Variable.Global */
|
57
|
+
.vi { color: #00688B } /* Name.Variable.Instance */
|
58
|
+
.il { color: #B452CD } /* Literal.Number.Integer.Long */
|
59
|
+
|
@@ -0,0 +1,62 @@
|
|
1
|
+
|
2
|
+
body {
|
3
|
+
font-family: Verdana, "Bitstream Vera Sans", sans-serif;
|
4
|
+
}
|
5
|
+
|
6
|
+
/* Headings
|
7
|
+
* --------------------------------------------------------------------- */
|
8
|
+
h1,h2,h3,h4,h5,h6 { color: #111; }
|
9
|
+
|
10
|
+
/* Text Elements
|
11
|
+
* --------------------------------------------------------------------- */
|
12
|
+
a { color: #125AA7; }
|
13
|
+
a:hover { color: #000; }
|
14
|
+
blockquote { color: #666; }
|
15
|
+
|
16
|
+
pre {
|
17
|
+
background: #eee;
|
18
|
+
border: 1px solid #ddd;
|
19
|
+
}
|
20
|
+
|
21
|
+
hr {
|
22
|
+
background: #B2CCFF;
|
23
|
+
color: #B2CCFF;
|
24
|
+
}
|
25
|
+
|
26
|
+
/* Tables
|
27
|
+
* --------------------------------------------------------------------- */
|
28
|
+
table {
|
29
|
+
border-top: 1px solid #ddd;
|
30
|
+
border-left: 1px solid #ddd;
|
31
|
+
}
|
32
|
+
th,td {
|
33
|
+
border-bottom: 1px solid #ddd;
|
34
|
+
border-right: 1px solid #ddd;
|
35
|
+
}
|
36
|
+
|
37
|
+
/* Default Classes
|
38
|
+
* --------------------------------------------------------------------- */
|
39
|
+
p.quiet { color: #666; }
|
40
|
+
.alt { color: #666; }
|
41
|
+
|
42
|
+
p.title {
|
43
|
+
color: #111;
|
44
|
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
45
|
+
font-size: 2em;
|
46
|
+
margin-bottom: 0.75em;
|
47
|
+
}
|
48
|
+
|
49
|
+
#header p.title { font-size: 3em; line-height: 1; margin-bottom: 0.5em; }
|
50
|
+
|
51
|
+
/* Fixes for Pygments */
|
52
|
+
pre {margin:0;}
|
53
|
+
pre, code, tt {line-height:1;}
|
54
|
+
table.highlighttable {
|
55
|
+
padding: 0;
|
56
|
+
margin: 0;
|
57
|
+
}
|
58
|
+
table.highlighttable td {
|
59
|
+
padding: 0;
|
60
|
+
margin: 0;
|
61
|
+
vertical-align: top;
|
62
|
+
}
|
@@ -0,0 +1,279 @@
|
|
1
|
+
/* ======================================================== */
|
2
|
+
/* Created by Devit Schizoper */
|
3
|
+
/* Created HomePages http://LoadFoo.starzonewebhost.com */
|
4
|
+
/* Created Day 01.12.2006 */
|
5
|
+
/* ======================================================== */
|
6
|
+
|
7
|
+
|
8
|
+
body {
|
9
|
+
margin: 0px;
|
10
|
+
background: url(../img/top_bg.gif);
|
11
|
+
background-repeat: repeat-x;
|
12
|
+
font-family: Verdana, Arial, sans-serif;
|
13
|
+
font-size: .6em;
|
14
|
+
}
|
15
|
+
|
16
|
+
p {
|
17
|
+
line-height: 17px;
|
18
|
+
margin: 11px 0 10px 0;
|
19
|
+
padding: 0px;
|
20
|
+
font-size: 1.2em;
|
21
|
+
}
|
22
|
+
|
23
|
+
code {
|
24
|
+
font-size: 1.3em;
|
25
|
+
}
|
26
|
+
.code {
|
27
|
+
font-size: 1.3em;
|
28
|
+
}
|
29
|
+
|
30
|
+
.highlight {
|
31
|
+
font-size: 1.5em;
|
32
|
+
}
|
33
|
+
|
34
|
+
h2 {
|
35
|
+
color: #9f9f9f;
|
36
|
+
margin:0px;
|
37
|
+
padding:0px;
|
38
|
+
font-size: 15px;
|
39
|
+
}
|
40
|
+
|
41
|
+
ul {
|
42
|
+
font-size: 10px;
|
43
|
+
margin:0;
|
44
|
+
padding:0;
|
45
|
+
list-style-image: url(../img/bullet.gif);
|
46
|
+
}
|
47
|
+
|
48
|
+
a {
|
49
|
+
color: #93B300;
|
50
|
+
}
|
51
|
+
|
52
|
+
a:hover {
|
53
|
+
text-decoration: none;
|
54
|
+
}
|
55
|
+
|
56
|
+
blockquote{
|
57
|
+
background: #F7FDE3;
|
58
|
+
color: #606060;
|
59
|
+
padding: 10px;
|
60
|
+
}
|
61
|
+
|
62
|
+
|
63
|
+
/**** Main Container ***/
|
64
|
+
|
65
|
+
|
66
|
+
#wrap {
|
67
|
+
margin-left: auto;
|
68
|
+
margin-right: auto;
|
69
|
+
width: 730px;
|
70
|
+
}
|
71
|
+
|
72
|
+
|
73
|
+
/**** Top ***/
|
74
|
+
|
75
|
+
|
76
|
+
#top {
|
77
|
+
width: 100%;
|
78
|
+
height: 88px;
|
79
|
+
color: #fff;
|
80
|
+
background: #000 url(../img/top_bg.gif);
|
81
|
+
overflow:hidden;
|
82
|
+
}
|
83
|
+
|
84
|
+
#top h2 {
|
85
|
+
color: White;
|
86
|
+
letter-spacing: 3px;
|
87
|
+
font-size: 2.4em;
|
88
|
+
font-weight: normal;
|
89
|
+
position: relative;
|
90
|
+
margin: 0px;
|
91
|
+
top:33px;
|
92
|
+
display:block;
|
93
|
+
float:left;
|
94
|
+
background: url(../img/bg_t.gif) no-repeat;
|
95
|
+
padding-left: 10px;
|
96
|
+
}
|
97
|
+
|
98
|
+
#top h2 a {
|
99
|
+
color: white;
|
100
|
+
text-decoration: none;
|
101
|
+
}
|
102
|
+
|
103
|
+
#top h2 a:hover {
|
104
|
+
color: #93B300;
|
105
|
+
}
|
106
|
+
|
107
|
+
|
108
|
+
/**** Main Menu ***/
|
109
|
+
|
110
|
+
|
111
|
+
#menu {
|
112
|
+
display: block;
|
113
|
+
float:right;
|
114
|
+
}
|
115
|
+
|
116
|
+
#menu ul {
|
117
|
+
margin: 0;
|
118
|
+
list-style: none;
|
119
|
+
}
|
120
|
+
|
121
|
+
#menu li {
|
122
|
+
display: block;
|
123
|
+
float: left;
|
124
|
+
white-space: nowrap;
|
125
|
+
}
|
126
|
+
|
127
|
+
#menu li a {
|
128
|
+
display: block;
|
129
|
+
padding: 55px 20px 12px 20px;
|
130
|
+
text-decoration: none;
|
131
|
+
color: #fff;
|
132
|
+
font-weight: bold;
|
133
|
+
}
|
134
|
+
|
135
|
+
* html #menu a {width:1%;}
|
136
|
+
|
137
|
+
#menu li a:hover {
|
138
|
+
background: url(../img/bg_menu.gif);
|
139
|
+
}
|
140
|
+
|
141
|
+
#menu li a.current {
|
142
|
+
letter-spacing: 1px;
|
143
|
+
color: gray;
|
144
|
+
background: url(../img/bg_menu.gif);
|
145
|
+
}
|
146
|
+
|
147
|
+
#menu li a.current:hover {
|
148
|
+
color: #fff;
|
149
|
+
}
|
150
|
+
|
151
|
+
|
152
|
+
/**** Content Container ***/
|
153
|
+
|
154
|
+
|
155
|
+
#content {
|
156
|
+
width: 100%;
|
157
|
+
margin-top:30px;
|
158
|
+
}
|
159
|
+
|
160
|
+
#content h2 {
|
161
|
+
margin: 0;
|
162
|
+
padding: 10px 0 10px 0;
|
163
|
+
}
|
164
|
+
|
165
|
+
|
166
|
+
/**** Content ***/
|
167
|
+
|
168
|
+
|
169
|
+
#left ul {
|
170
|
+
padding: 15px 0 15px 35px;
|
171
|
+
margin:0;
|
172
|
+
}
|
173
|
+
|
174
|
+
#left li {
|
175
|
+
margin-bottom:5px;
|
176
|
+
}
|
177
|
+
|
178
|
+
#left {
|
179
|
+
width: 390px;
|
180
|
+
float:left;
|
181
|
+
display: block;
|
182
|
+
margin-left: 20px;
|
183
|
+
display: inline;
|
184
|
+
}
|
185
|
+
|
186
|
+
|
187
|
+
/**** Sidebar ***/
|
188
|
+
|
189
|
+
|
190
|
+
#right {
|
191
|
+
width: 315px;
|
192
|
+
float: right;
|
193
|
+
display:block;
|
194
|
+
margin-top: 10px;
|
195
|
+
}
|
196
|
+
|
197
|
+
#right .box {
|
198
|
+
width: 24em;/*280px*/
|
199
|
+
background: #F6F9FB;
|
200
|
+
border: 1px solid #E1E1E1;
|
201
|
+
padding:10px 10px 15px 10px;
|
202
|
+
float: right;
|
203
|
+
}
|
204
|
+
|
205
|
+
#right .box h2 {
|
206
|
+
font-size: 1.1em;
|
207
|
+
margin: 0px 0 0px 0;
|
208
|
+
padding:0px 0 5px 0;
|
209
|
+
}
|
210
|
+
|
211
|
+
#right .box a {
|
212
|
+
margin: 10px 0 10px 0;
|
213
|
+
color: #93B300;
|
214
|
+
font-size: 10px;
|
215
|
+
}
|
216
|
+
|
217
|
+
#right .box p {
|
218
|
+
margin: 5px 0 10px 0;
|
219
|
+
line-height: 15px;
|
220
|
+
}
|
221
|
+
|
222
|
+
#right .box ul {
|
223
|
+
padding: 0 0 7px 20px;
|
224
|
+
margin:10px 0 10px 0;
|
225
|
+
}
|
226
|
+
|
227
|
+
#right .box li {
|
228
|
+
margin-top:5px;
|
229
|
+
}
|
230
|
+
|
231
|
+
#nav{ list-style: none; margin: 2.0em 0; width: 25em; float: right;}
|
232
|
+
#nav li{ padding: 0; margin: 0; }
|
233
|
+
#nav a{
|
234
|
+
display: block;
|
235
|
+
height: 2.0em;
|
236
|
+
padding: 0.3em 0.3em 0.3em 0.8em;
|
237
|
+
border-bottom: 2px; /*solid #1a1a1a*/
|
238
|
+
border-top: 2px; /*solid #1a1a1a*/
|
239
|
+
color: #93B300;
|
240
|
+
background-color: #F7F9FB;
|
241
|
+
font-weight: bold;
|
242
|
+
text-decoration: none;
|
243
|
+
}
|
244
|
+
|
245
|
+
#nav a:hover{
|
246
|
+
color: #1a1a1a;
|
247
|
+
background: url(../img/bg_t.gif) no-repeat;
|
248
|
+
background-color: #fff;
|
249
|
+
font-weight: bold;
|
250
|
+
}
|
251
|
+
|
252
|
+
/**** Clear Div ***/
|
253
|
+
|
254
|
+
|
255
|
+
#clear {
|
256
|
+
display: block;
|
257
|
+
clear: both;
|
258
|
+
width: 100%;
|
259
|
+
height:1px;
|
260
|
+
overflow:hidden;
|
261
|
+
}
|
262
|
+
|
263
|
+
|
264
|
+
/**** Footer ***/
|
265
|
+
|
266
|
+
|
267
|
+
#footer {
|
268
|
+
margin: 40px auto 0 auto;
|
269
|
+
text-align: center;
|
270
|
+
border-top: dotted 1px gray;
|
271
|
+
padding: 20px 0 20px 0;
|
272
|
+
width: 70%;
|
273
|
+
}
|
274
|
+
|
275
|
+
#footer p {
|
276
|
+
margin: 0px;
|
277
|
+
padding: 0;
|
278
|
+
font-size: 0.9em;
|
279
|
+
}
|
Binary file
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'surpass'
|
3
|
+
|
4
|
+
book = Workbook.new(__FILE__.gsub(/rb$/, "xls"))
|
5
|
+
sheet = book.add_sheet
|
6
|
+
|
7
|
+
# Passing true for the style parameter to write will invoke autoformatting.
|
8
|
+
sheet.write(0, 0, "Hello World!", true)
|
9
|
+
sheet.write(1, 0, 1, true)
|
10
|
+
sheet.write(2, 0, 1.0, true)
|
11
|
+
sheet.write(3, 0, Date.today, true)
|
12
|
+
sheet.write(4, 0, DateTime.now, true)
|
13
|
+
sheet.write(5, 0, Time.now, true)
|
14
|
+
|
15
|
+
array_of_arrays = [
|
16
|
+
[1, 2, 3],
|
17
|
+
[1.0, 2.0, 3.0],
|
18
|
+
[Date.today, DateTime.now],
|
19
|
+
%w{a b c}
|
20
|
+
]
|
21
|
+
|
22
|
+
# Writing arrays will automatically autoformat.
|
23
|
+
sheet.write(7, 0, "With autoformat:")
|
24
|
+
sheet.write_arrays(8, 0, array_of_arrays)
|
25
|
+
|
26
|
+
# Unless you specify your own format, or nil for a generic default.
|
27
|
+
sheet.write(13, 0, "Without autoformat:")
|
28
|
+
sheet.write_arrays(14, 0, array_of_arrays, nil)
|
29
|
+
|
30
|
+
sheet.set_column_widths(0..2, 20)
|
31
|
+
|
32
|
+
book.save
|
Binary file
|
Binary file
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'surpass'
|
3
|
+
|
4
|
+
book = Workbook.new
|
5
|
+
sheet = book.add_sheet("Borders")
|
6
|
+
|
7
|
+
per_row = 18
|
8
|
+
|
9
|
+
Borders.line_type_directives.sort.each_with_index do |c, i|
|
10
|
+
format = StyleFormat.new
|
11
|
+
format.borders.all = c
|
12
|
+
sheet.write(i*2+1, 1, c, format)
|
13
|
+
end
|
14
|
+
|
15
|
+
book.save(__FILE__.gsub(/rb$/, "xls"))
|
Binary file
|
Binary file
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'surpass'
|
3
|
+
|
4
|
+
book = Workbook.new(__FILE__.gsub(/rb$/, "xls"))
|
5
|
+
sheet = book.add_sheet("Colours") # You can name your worksheets.
|
6
|
+
|
7
|
+
per_row = 18
|
8
|
+
|
9
|
+
Formatting::COLORS.keys.sort.each_with_index do |c, i|
|
10
|
+
format = StyleFormat.new
|
11
|
+
format.pattern.color = c
|
12
|
+
row = i % per_row
|
13
|
+
color_column = (i/per_row)*2
|
14
|
+
label_column = (i/per_row)*2 + 1
|
15
|
+
|
16
|
+
sheet.write(row, color_column, nil, :fill_color => c)
|
17
|
+
sheet.write(row, label_column, c, :font_size => 16)
|
18
|
+
|
19
|
+
sheet.set_column_width(color_column, 3)
|
20
|
+
sheet.set_column_width(label_column, 30)
|
21
|
+
end
|
22
|
+
|
23
|
+
book.save
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,78 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'surpass'
|
3
|
+
|
4
|
+
book = Workbook.new(__FILE__.gsub(/rb$/, "xls"))
|
5
|
+
sheet = book.add_sheet("Demo Worksheet") # You can name your worksheets.
|
6
|
+
|
7
|
+
# Let's set up some formatting.
|
8
|
+
|
9
|
+
# Remember to use Excel-style formatting directives, not sprintf.
|
10
|
+
date_format = StyleFormat.new(:number_format_string => "DDDD DD MMM YYYY")
|
11
|
+
|
12
|
+
fancy_format = StyleFormat.new(
|
13
|
+
:font_name => 'Times New Roman',
|
14
|
+
:font_colour => 'green',
|
15
|
+
:font_italic => true
|
16
|
+
)
|
17
|
+
|
18
|
+
sheet.write(0, 0, "Hello World!", fancy_format)
|
19
|
+
sheet.write(0, 1, Date.today, date_format)
|
20
|
+
|
21
|
+
# You can also set up formatting by passing attributes directly to the constituents of StyleFormat
|
22
|
+
|
23
|
+
# Font colours.
|
24
|
+
Formatting::COLOURS.keys.each_with_index do |c, i|
|
25
|
+
format = StyleFormat.new
|
26
|
+
format.font.name = 'Verdana'
|
27
|
+
format.font.color = c
|
28
|
+
format.font.size = i + 5
|
29
|
+
sheet.write(i, 5, c, format)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Font underlining.
|
33
|
+
|
34
|
+
[:none, :single, :single_accounting, :double, :double_accounting, nil, true, false].each_with_index do |u, i|
|
35
|
+
format = StyleFormat.new
|
36
|
+
format.font.underline = u
|
37
|
+
sheet.write(i, 7, u.to_s, format)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Font bold, italic, strikethrough, outline are simple booleans.
|
41
|
+
[:bold, :italic, :struck_out, :outline].each_with_index do |s, i|
|
42
|
+
attribute = ("font_" + s.to_s).to_sym
|
43
|
+
sheet.write(i, 8, s.to_s, StyleFormat.new(attribute => true))
|
44
|
+
end
|
45
|
+
|
46
|
+
# Cell alignment.
|
47
|
+
sheet.write(15, 2, "top left", :text_align => 'top left',
|
48
|
+
:border_top => 'pink',
|
49
|
+
:border_left => 'pink'
|
50
|
+
)
|
51
|
+
sheet.write(15, 3, "top center", :text_align => 'top center')
|
52
|
+
sheet.write(15, 4, "top right", :text_align => 'top right')
|
53
|
+
sheet.write(16, 2, "bottom left", :text_align => 'bottom left')
|
54
|
+
sheet.write(16, 3, "bottom centre", :text_align => 'bottom centre')
|
55
|
+
sheet.write(16, 4, "bottom right", :text_align => 'bottom right',
|
56
|
+
:border_bottom => 'pink',
|
57
|
+
:border_right => 'pink'
|
58
|
+
)
|
59
|
+
|
60
|
+
|
61
|
+
# Borders
|
62
|
+
sheet.write(3, 1, "borders",
|
63
|
+
:border_right => 'medium blue',
|
64
|
+
:border_left => 'yellow', # thin by default
|
65
|
+
:border_top => 'dotted purple',
|
66
|
+
:border_bottom => 'dashed' # black by default
|
67
|
+
)
|
68
|
+
|
69
|
+
# Or the hash-free option.
|
70
|
+
crazy_border_format = StyleFormat.new
|
71
|
+
crazy_border_format.borders.all = 'slanted-medium-dash-dotted grey'
|
72
|
+
crazy_border_format.pattern.fill = 'light-cornflower-blue'
|
73
|
+
|
74
|
+
sheet.write(5, 1, "borders", crazy_border_format)
|
75
|
+
|
76
|
+
sheet.write(7, 1, "fill", :fill_color => 'yellow')
|
77
|
+
|
78
|
+
book.save
|
Binary file
|
Binary file
|