surpass 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/surpass/worksheet.rb +1 -1
- data/lib/surpass.rb +1 -1
- data/out.bin +0 -0
- metadata +3 -263
- data/examples/big-16mb.rb +0 -25
- data/examples/big-random-strings.rb +0 -28
- data/examples/blanks.rb +0 -34
- data/examples/blanks.xls +0 -0
- data/examples/col_width.rb +0 -16
- data/examples/col_width.xls +0 -0
- data/examples/dates.rb +0 -31
- data/examples/dates.xls +0 -0
- data/examples/format.rb +0 -23
- data/examples/format.xls +0 -0
- data/examples/hello-world.rb +0 -9
- data/examples/hello-world.xls +0 -0
- data/examples/image.rb +0 -10
- data/examples/image.xls +0 -0
- data/examples/merged.rb +0 -36
- data/examples/merged.xls +0 -0
- data/examples/merged0.rb +0 -27
- data/examples/merged0.xls +0 -0
- data/examples/merged1.rb +0 -99
- data/examples/merged1.xls +0 -0
- data/examples/num_formats.rb +0 -55
- data/examples/num_formats.xls +0 -0
- data/examples/numbers.rb +0 -24
- data/examples/numbers.xls +0 -0
- data/examples/outline.rb +0 -110
- data/examples/outline.xls +0 -0
- data/examples/panes.rb +0 -48
- data/examples/panes.xls +0 -0
- data/examples/protection.rb +0 -132
- data/examples/protection.xls +0 -0
- data/examples/python.bmp +0 -0
- data/examples/row_styles.rb +0 -16
- data/examples/row_styles.xls +0 -0
- data/examples/row_styles_empty.rb +0 -15
- data/examples/row_styles_empty.xls +0 -0
- data/examples/set_cell_and_range_style.rb +0 -12
- data/examples/set_cell_and_range_style.xls +0 -0
- data/examples/wrapped-text.rb +0 -13
- data/examples/wrapped-text.xls +0 -0
- data/examples/write_arrays.rb +0 -22
- data/examples/write_arrays.xls +0 -0
- data/examples/ws_props.rb +0 -80
- data/spec/biff_record_spec.rb +0 -268
- data/spec/cell_spec.rb +0 -56
- data/spec/data/random-strings.txt +0 -10000
- data/spec/document_spec.rb +0 -168
- data/spec/excel_formula_spec.rb +0 -27
- data/spec/formatting_spec.rb +0 -53
- 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 +0 -19
- data/spec/spec_helper.rb +0 -10
- data/spec/style_spec.rb +0 -89
- data/spec/surpass_spec.rb +0 -7
- data/spec/utilities_spec.rb +0 -57
- data/spec/workbook_spec.rb +0 -48
- data/spec/worksheet_spec.rb +0 -0
- data/stats/cloc.txt +0 -8
- data/stats/rcov.txt +0 -0
- data/stats/specdoc.txt +0 -158
- data/webby/README.txt +0 -6
- data/webby/Sitefile +0 -43
- data/webby/content/css/pygments.txt +0 -6
- data/webby/content/css/style.css +0 -279
- data/webby/content/examples/autoformat.png +0 -0
- data/webby/content/examples/autoformat.rb +0 -32
- data/webby/content/examples/autoformat.xls +0 -0
- data/webby/content/examples/borders.png +0 -0
- data/webby/content/examples/borders.rb +0 -15
- data/webby/content/examples/borders.xls +0 -0
- data/webby/content/examples/colours.png +0 -0
- data/webby/content/examples/colours.rb +0 -23
- data/webby/content/examples/colours.xls +0 -0
- data/webby/content/examples/data.png +0 -0
- data/webby/content/examples/data.rb +0 -11
- data/webby/content/examples/data.xls +0 -0
- data/webby/content/examples/formatting.png +0 -0
- data/webby/content/examples/formatting.rb +0 -78
- data/webby/content/examples/formatting.xls +0 -0
- data/webby/content/examples/hello-world.png +0 -0
- data/webby/content/examples/hello-world.py +0 -8
- data/webby/content/examples/hello-world.rb +0 -9
- 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 +0 -14
- data/webby/content/examples/number-format-string.xls +0 -0
- data/webby/content/examples/patterns.png +0 -0
- data/webby/content/examples/patterns.rb +0 -26
- data/webby/content/examples/patterns.xls +0 -0
- data/webby/content/examples/show-greens.sh +0 -1
- data/webby/content/examples/surpass-info.sh +0 -1
- 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 +0 -16
- data/webby/content/installation/index.txt +0 -24
- data/webby/content/source/ExcelFormulaLexer.txt +0 -7
- data/webby/content/source/ExcelFormulaParser.txt +0 -7
- data/webby/content/source/biff_record.txt +0 -7
- data/webby/content/source/bitmap.txt +0 -7
- data/webby/content/source/cell.txt +0 -7
- data/webby/content/source/chart.txt +0 -7
- data/webby/content/source/column.txt +0 -7
- data/webby/content/source/document.txt +0 -7
- data/webby/content/source/excel_formula.txt +0 -7
- data/webby/content/source/excel_magic.txt +0 -7
- data/webby/content/source/formatting.txt +0 -7
- data/webby/content/source/row.txt +0 -7
- data/webby/content/source/style.txt +0 -7
- data/webby/content/source/utilities.txt +0 -7
- data/webby/content/source/workbook.txt +0 -7
- data/webby/content/source/worksheet.txt +0 -7
- data/webby/content/surpass-manual.erb +0 -198
- data/webby/layouts/book.txt +0 -29
- data/webby/layouts/default.txt +0 -27
- data/webby/layouts/two_column.txt +0 -25
- data/webby/layouts/web.txt +0 -66
- data/webby/output/.cairn +0 -0
- data/webby/output/css/blueprint/ie.css +0 -26
- 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 +0 -32
- data/webby/output/css/blueprint/plugins/buttons/screen.css +0 -97
- data/webby/output/css/blueprint/plugins/fancy-type/readme.txt +0 -14
- data/webby/output/css/blueprint/plugins/fancy-type/screen.css +0 -71
- 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 +0 -18
- data/webby/output/css/blueprint/plugins/link-icons/screen.css +0 -40
- data/webby/output/css/blueprint/plugins/rtl/readme.txt +0 -10
- data/webby/output/css/blueprint/plugins/rtl/screen.css +0 -109
- data/webby/output/css/blueprint/print.css +0 -30
- data/webby/output/css/blueprint/screen.css +0 -251
- data/webby/output/css/blueprint/src/forms.css +0 -49
- data/webby/output/css/blueprint/src/grid.css +0 -212
- data/webby/output/css/blueprint/src/grid.png +0 -0
- data/webby/output/css/blueprint/src/ie.css +0 -59
- data/webby/output/css/blueprint/src/print.css +0 -85
- data/webby/output/css/blueprint/src/reset.css +0 -38
- data/webby/output/css/blueprint/src/typography.css +0 -105
- data/webby/output/css/pygments.css +0 -59
- data/webby/output/css/site.css +0 -62
- data/webby/output/css/style.css +0 -279
- data/webby/output/examples/autoformat.png +0 -0
- data/webby/output/examples/autoformat.rb +0 -32
- data/webby/output/examples/autoformat.xls +0 -0
- data/webby/output/examples/borders.png +0 -0
- data/webby/output/examples/borders.rb +0 -15
- data/webby/output/examples/borders.xls +0 -0
- data/webby/output/examples/colours.png +0 -0
- data/webby/output/examples/colours.rb +0 -23
- data/webby/output/examples/colours.xls +0 -0
- data/webby/output/examples/data.png +0 -0
- data/webby/output/examples/data.rb +0 -11
- data/webby/output/examples/data.xls +0 -0
- data/webby/output/examples/formatting.png +0 -0
- data/webby/output/examples/formatting.rb +0 -78
- data/webby/output/examples/formatting.xls +0 -0
- data/webby/output/examples/hello-world.png +0 -0
- data/webby/output/examples/hello-world.py +0 -8
- data/webby/output/examples/hello-world.rb +0 -9
- 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 +0 -14
- data/webby/output/examples/number-format-string.xls +0 -0
- data/webby/output/examples/patterns.png +0 -0
- data/webby/output/examples/patterns.rb +0 -26
- data/webby/output/examples/patterns.xls +0 -0
- data/webby/output/examples/show-greens.sh +0 -1
- data/webby/output/examples/surpass-info.sh +0 -1
- 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 +0 -138
- data/webby/output/installation/index.html +0 -64
- data/webby/output/installation/installation.html +0 -1
- data/webby/output/installation.html +0 -1
- data/webby/output/source/ExcelFormulaLexer.html +0 -981
- data/webby/output/source/ExcelFormulaParser.html +0 -661
- data/webby/output/source/biff_record.html +0 -462
- data/webby/output/source/bitmap.html +0 -277
- data/webby/output/source/cell.html +0 -241
- data/webby/output/source/chart.html +0 -64
- data/webby/output/source/column.html +0 -99
- data/webby/output/source/document.html +0 -465
- data/webby/output/source/excel_formula.html +0 -82
- data/webby/output/source/excel_magic.html +0 -1072
- data/webby/output/source/formatting.html +0 -664
- data/webby/output/source/row.html +0 -169
- data/webby/output/source/style.html +0 -158
- data/webby/output/source/surpass.html +0 -110
- data/webby/output/source/utilities.html +0 -145
- data/webby/output/source/workbook.html +0 -265
- data/webby/output/source/worksheet.html +0 -331
- data/webby/output/surpass-manual-0-0-5.pdf +0 -0
- data/webby/output/surpass-manual.aux +0 -50
- data/webby/output/surpass-manual.log +0 -366
- data/webby/output/surpass-manual.out +0 -20
- data/webby/output/surpass-manual.tex +0 -582
- data/webby/output/surpass-manual.toc +0 -20
- data/webby/rsync-exclude +0 -7
- data/webby/tasks/latex.rake +0 -14
- data/webby/tasks/screenshots.rb +0 -58
- data/webby/templates/article.erb +0 -15
- data/webby/templates/book.erb +0 -16
- data/webby/templates/page.erb +0 -9
data/examples/merged1.rb
DELETED
@@ -1,99 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "surpass"
|
3
|
-
|
4
|
-
book = Workbook.new
|
5
|
-
ws0 = book.add_sheet
|
6
|
-
|
7
|
-
fnt1 = Font.new
|
8
|
-
fnt1.name = 'Verdana'
|
9
|
-
fnt1.bold = true
|
10
|
-
fnt1.height = 18*0x14
|
11
|
-
|
12
|
-
pat1 = Pattern.new
|
13
|
-
pat1.pattern = Pattern::SOLID_PATTERN
|
14
|
-
pat1.pattern_fore_colour = 0x16
|
15
|
-
|
16
|
-
brd1 = Borders.new
|
17
|
-
brd1.left = 0x06
|
18
|
-
brd1.right = 0x06
|
19
|
-
brd1.top = 0x06
|
20
|
-
brd1.bottom = 0x06
|
21
|
-
|
22
|
-
fnt2 = Font.new
|
23
|
-
fnt2.name = 'Verdana'
|
24
|
-
fnt2.bold = true
|
25
|
-
fnt2.height = 14*0x14
|
26
|
-
|
27
|
-
brd2 = Borders.new
|
28
|
-
brd2.left = 0x01
|
29
|
-
brd2.right = 0x01
|
30
|
-
brd2.top = 0x01
|
31
|
-
brd2.bottom = 0x01
|
32
|
-
|
33
|
-
pat2 = Pattern.new
|
34
|
-
pat2.pattern = Pattern::SOLID_PATTERN
|
35
|
-
pat2.pattern_fore_colour = 0x01F
|
36
|
-
|
37
|
-
fnt3 = Font.new
|
38
|
-
fnt3.name = 'Verdana'
|
39
|
-
fnt3.bold = true
|
40
|
-
fnt3.italic = true
|
41
|
-
fnt3.height = 12*0x14
|
42
|
-
|
43
|
-
brd3 = Borders.new
|
44
|
-
brd3.left = 0x07
|
45
|
-
brd3.right = 0x07
|
46
|
-
brd3.top = 0x07
|
47
|
-
brd3.bottom = 0x07
|
48
|
-
|
49
|
-
fnt4 = Font.new
|
50
|
-
|
51
|
-
al1 = Alignment.new
|
52
|
-
al1.horz = Alignment::HORZ_CENTER
|
53
|
-
al1.vert = Alignment::VERT_CENTER
|
54
|
-
|
55
|
-
al2 = Alignment.new
|
56
|
-
al2.horz = Alignment::HORZ_RIGHT
|
57
|
-
al2.vert = Alignment::VERT_CENTER
|
58
|
-
|
59
|
-
al3 = Alignment.new
|
60
|
-
al3.horz = Alignment::HORZ_LEFT
|
61
|
-
al3.vert = Alignment::VERT_CENTER
|
62
|
-
|
63
|
-
style1 = StyleFormat.new
|
64
|
-
style1.font = fnt1
|
65
|
-
style1.alignment = al1
|
66
|
-
style1.pattern = pat1
|
67
|
-
style1.borders = brd1
|
68
|
-
|
69
|
-
style2 = StyleFormat.new
|
70
|
-
style2.font = fnt2
|
71
|
-
style2.alignment = al1
|
72
|
-
style2.pattern = pat2
|
73
|
-
style2.borders = brd2
|
74
|
-
|
75
|
-
style3 = StyleFormat.new
|
76
|
-
style3.font = fnt3
|
77
|
-
style3.alignment = al1
|
78
|
-
style3.pattern = pat2
|
79
|
-
style3.borders = brd3
|
80
|
-
|
81
|
-
price_style = StyleFormat.new
|
82
|
-
price_style.font = fnt4
|
83
|
-
price_style.alignment = al2
|
84
|
-
price_style.borders = brd3
|
85
|
-
price_style.number_format_string = '_(#,##0.00_) "money"'
|
86
|
-
|
87
|
-
ware_style = StyleFormat.new
|
88
|
-
ware_style.font = fnt4
|
89
|
-
ware_style.alignment = al3
|
90
|
-
ware_style.borders = brd3
|
91
|
-
|
92
|
-
|
93
|
-
ws0.merge(3, 3, 1, 5, style1)
|
94
|
-
ws0.merge(4, 10, 1, 6, style2)
|
95
|
-
ws0.merge(14, 16, 1, 7, style3)
|
96
|
-
ws0.set_column_width(1, 0x0d00)
|
97
|
-
|
98
|
-
|
99
|
-
book.save(__FILE__.gsub(/rb$/, "xls"))
|
data/examples/merged1.xls
DELETED
Binary file
|
data/examples/num_formats.rb
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "surpass"
|
3
|
-
|
4
|
-
book = Workbook.new
|
5
|
-
ws = book.add_sheet
|
6
|
-
|
7
|
-
fmts = [
|
8
|
-
'General',
|
9
|
-
'0',
|
10
|
-
'0.00',
|
11
|
-
'#,##0',
|
12
|
-
'#,##0.00',
|
13
|
-
'"$"#,##0_);("$"#,##',
|
14
|
-
'"$"#,##0_);[Red]("$"#,##',
|
15
|
-
'"$"#,##0.00_);("$"#,##',
|
16
|
-
'"$"#,##0.00_);[Red]("$"#,##',
|
17
|
-
'0%',
|
18
|
-
'0.00%',
|
19
|
-
'0.00E+00',
|
20
|
-
'# ?/?',
|
21
|
-
'# ??/??',
|
22
|
-
'M/D/YY',
|
23
|
-
'D-MMM-YY',
|
24
|
-
'D-MMM',
|
25
|
-
'MMM-YY',
|
26
|
-
'h:mm AM/PM',
|
27
|
-
'h:mm:ss AM/PM',
|
28
|
-
'h:mm',
|
29
|
-
'h:mm:ss',
|
30
|
-
'M/D/YY h:mm',
|
31
|
-
'_(#,##0_);(#,##0)',
|
32
|
-
'_(#,##0_);[Red](#,##0)',
|
33
|
-
'_(#,##0.00_);(#,##0.00)',
|
34
|
-
'_(#,##0.00_);[Red](#,##0.00)',
|
35
|
-
'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',
|
36
|
-
'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',
|
37
|
-
'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',
|
38
|
-
'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',
|
39
|
-
'mm:ss',
|
40
|
-
'[h]:mm:ss',
|
41
|
-
'mm:ss.0',
|
42
|
-
'##0.0E+0',
|
43
|
-
'@'
|
44
|
-
]
|
45
|
-
|
46
|
-
fmts.each_with_index do |fmt, i|
|
47
|
-
ws.write(i, 0, fmt)
|
48
|
-
|
49
|
-
style = StyleFormat.new
|
50
|
-
style.number_format_string = fmt
|
51
|
-
|
52
|
-
ws.write(i, 4, -1278.9078, style)
|
53
|
-
end
|
54
|
-
|
55
|
-
book.save(__FILE__.gsub(/rb$/, "xls"))
|
data/examples/num_formats.xls
DELETED
Binary file
|
data/examples/numbers.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "surpass"
|
3
|
-
|
4
|
-
book = Workbook.new
|
5
|
-
ws = book.add_sheet
|
6
|
-
|
7
|
-
ws.write(0, 0, 1)
|
8
|
-
ws.write(1, 0, 1.23)
|
9
|
-
ws.write(2, 0, 12345678)
|
10
|
-
ws.write(3, 0, 123456.78)
|
11
|
-
|
12
|
-
ws.write(0, 1, -1)
|
13
|
-
ws.write(1, 1, -1.23)
|
14
|
-
ws.write(2, 1, -12345678)
|
15
|
-
ws.write(3, 1, -123456.78)
|
16
|
-
|
17
|
-
ws.write(0, 2, -17867868678687.0)
|
18
|
-
ws.write(1, 2, -1.23e-5)
|
19
|
-
ws.write(2, 2, -12345678.90780980)
|
20
|
-
ws.write(3, 2, -123456.78)
|
21
|
-
|
22
|
-
ws.write(0, 4, true)
|
23
|
-
|
24
|
-
book.save(__FILE__.gsub(/rb$/, "xls"))
|
data/examples/numbers.xls
DELETED
Binary file
|
data/examples/outline.rb
DELETED
@@ -1,110 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "surpass"
|
3
|
-
|
4
|
-
fnt = Font.new
|
5
|
-
fnt.name = 'Arial'
|
6
|
-
fnt.colour_index = 4
|
7
|
-
fnt.bold = true
|
8
|
-
|
9
|
-
borders = Borders.new
|
10
|
-
borders.left = 6
|
11
|
-
borders.right = 6
|
12
|
-
borders.top = 6
|
13
|
-
borders.bottom = 6
|
14
|
-
|
15
|
-
style = StyleFormat.new
|
16
|
-
style.font = fnt
|
17
|
-
style.borders = borders
|
18
|
-
|
19
|
-
book = Workbook.new
|
20
|
-
|
21
|
-
ws0 = book.add_sheet('Rows Outline')
|
22
|
-
|
23
|
-
ws0.write_merge(1, 1, 1, 5, 'test 1', style)
|
24
|
-
ws0.write_merge(2, 2, 1, 4, 'test 1', style)
|
25
|
-
ws0.write_merge(3, 3, 1, 3, 'test 2', style)
|
26
|
-
ws0.write_merge(4, 4, 1, 4, 'test 1', style)
|
27
|
-
ws0.write_merge(5, 5, 1, 4, 'test 3', style)
|
28
|
-
ws0.write_merge(6, 6, 1, 5, 'test 1', style)
|
29
|
-
ws0.write_merge(7, 7, 1, 5, 'test 4', style)
|
30
|
-
ws0.write_merge(8, 8, 1, 4, 'test 1', style)
|
31
|
-
ws0.write_merge(9, 9, 1, 3, 'test 5', style)
|
32
|
-
|
33
|
-
ws0.row(1).level = 1
|
34
|
-
ws0.row(2).level = 1
|
35
|
-
ws0.row(3).level = 2
|
36
|
-
ws0.row(4).level = 2
|
37
|
-
ws0.row(5).level = 2
|
38
|
-
ws0.row(6).level = 2
|
39
|
-
ws0.row(7).level = 2
|
40
|
-
ws0.row(8).level = 1
|
41
|
-
ws0.row(9).level = 1
|
42
|
-
|
43
|
-
|
44
|
-
ws1 = book.add_sheet('Columns Outline')
|
45
|
-
|
46
|
-
ws1.write_merge(1, 1, 1, 5, 'test 1', style)
|
47
|
-
ws1.write_merge(2, 2, 1, 4, 'test 1', style)
|
48
|
-
ws1.write_merge(3, 3, 1, 3, 'test 2', style)
|
49
|
-
ws1.write_merge(4, 4, 1, 4, 'test 1', style)
|
50
|
-
ws1.write_merge(5, 5, 1, 4, 'test 3', style)
|
51
|
-
ws1.write_merge(6, 6, 1, 5, 'test 1', style)
|
52
|
-
ws1.write_merge(7, 7, 1, 5, 'test 4', style)
|
53
|
-
ws1.write_merge(8, 8, 1, 4, 'test 1', style)
|
54
|
-
ws1.write_merge(9, 9, 1, 3, 'test 5', style)
|
55
|
-
|
56
|
-
ws1.col(1).level = 1
|
57
|
-
ws1.col(2).level = 1
|
58
|
-
ws1.col(3).level = 2
|
59
|
-
ws1.col(4).level = 2
|
60
|
-
ws1.col(5).level = 2
|
61
|
-
ws1.col(6).level = 2
|
62
|
-
ws1.col(7).level = 2
|
63
|
-
ws1.col(8).level = 1
|
64
|
-
ws1.col(9).level = 1
|
65
|
-
|
66
|
-
|
67
|
-
ws2 = book.add_sheet('Rows and Columns Outline')
|
68
|
-
|
69
|
-
ws2.write_merge(1, 1, 1, 5, 'test 1', style)
|
70
|
-
ws2.write_merge(2, 2, 1, 4, 'test 1', style)
|
71
|
-
ws2.write_merge(3, 3, 1, 3, 'test 2', style)
|
72
|
-
ws2.write_merge(4, 4, 1, 4, 'test 1', style)
|
73
|
-
ws2.write_merge(5, 5, 1, 4, 'test 3', style)
|
74
|
-
ws2.write_merge(6, 6, 1, 5, 'test 1', style)
|
75
|
-
ws2.write_merge(7, 7, 1, 5, 'test 4', style)
|
76
|
-
ws2.write_merge(8, 8, 1, 4, 'test 1', style)
|
77
|
-
ws2.write_merge(9, 9, 1, 3, 'test 5', style)
|
78
|
-
|
79
|
-
ws2.row(1).level = 1
|
80
|
-
ws2.row(2).level = 1
|
81
|
-
ws2.row(3).level = 2
|
82
|
-
ws2.row(4).level = 2
|
83
|
-
ws2.row(5).level = 2
|
84
|
-
ws2.row(6).level = 2
|
85
|
-
ws2.row(7).level = 2
|
86
|
-
ws2.row(8).level = 1
|
87
|
-
ws2.row(9).level = 1
|
88
|
-
|
89
|
-
ws2.write_merge(1, 1, 1, 5, 'test 1', style)
|
90
|
-
ws2.write_merge(2, 2, 1, 4, 'test 1', style)
|
91
|
-
ws2.write_merge(3, 3, 1, 3, 'test 2', style)
|
92
|
-
ws2.write_merge(4, 4, 1, 4, 'test 1', style)
|
93
|
-
ws2.write_merge(5, 5, 1, 4, 'test 3', style)
|
94
|
-
ws2.write_merge(6, 6, 1, 5, 'test 1', style)
|
95
|
-
ws2.write_merge(7, 7, 1, 5, 'test 4', style)
|
96
|
-
ws2.write_merge(8, 8, 1, 4, 'test 1', style)
|
97
|
-
ws2.write_merge(9, 9, 1, 3, 'test 5', style)
|
98
|
-
|
99
|
-
ws2.col(1).level = 1
|
100
|
-
ws2.col(2).level = 1
|
101
|
-
ws2.col(3).level = 2
|
102
|
-
ws2.col(4).level = 2
|
103
|
-
ws2.col(5).level = 2
|
104
|
-
ws2.col(6).level = 2
|
105
|
-
ws2.col(7).level = 2
|
106
|
-
ws2.col(8).level = 1
|
107
|
-
ws2.col(9).level = 1
|
108
|
-
|
109
|
-
|
110
|
-
book.save(__FILE__.gsub(/rb$/, "xls"))
|
data/examples/outline.xls
DELETED
Binary file
|
data/examples/panes.rb
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "surpass"
|
3
|
-
|
4
|
-
# TODO this is broken in both Ruby and Python
|
5
|
-
|
6
|
-
book = Workbook.new
|
7
|
-
ws1 = book.add_sheet
|
8
|
-
ws2 = book.add_sheet
|
9
|
-
ws3 = book.add_sheet
|
10
|
-
ws4 = book.add_sheet
|
11
|
-
ws5 = book.add_sheet
|
12
|
-
ws6 = book.add_sheet
|
13
|
-
|
14
|
-
0.upto(0x100) do |i|
|
15
|
-
ws1.write(i/0x10, i%0x10, i)
|
16
|
-
ws2.write(i/0x10, i%0x10, i)
|
17
|
-
ws3.write(i/0x10, i%0x10, i)
|
18
|
-
ws4.write(i/0x10, i%0x10, i)
|
19
|
-
ws5.write(i/0x10, i%0x10, i)
|
20
|
-
ws6.write(i/0x10, i%0x10, i)
|
21
|
-
end
|
22
|
-
|
23
|
-
ws1.panes_frozen = true
|
24
|
-
ws1.horz_split_pos = 2
|
25
|
-
|
26
|
-
ws2.panes_frozen = true
|
27
|
-
ws2.vert_split_pos = 2
|
28
|
-
|
29
|
-
ws3.panes_frozen = true
|
30
|
-
ws3.horz_split_pos = 1
|
31
|
-
ws3.vert_split_pos = 1
|
32
|
-
|
33
|
-
ws4.panes_frozen = false
|
34
|
-
ws4.horz_split_pos = 12
|
35
|
-
ws4.horz_split_first_visible = 2
|
36
|
-
|
37
|
-
ws5.panes_frozen = false
|
38
|
-
ws5.vert_split_pos = 40
|
39
|
-
ws4.vert_split_first_visible = 2
|
40
|
-
|
41
|
-
ws6.panes_frozen = false
|
42
|
-
ws6.horz_split_pos = 12
|
43
|
-
ws4.horz_split_first_visible = 2
|
44
|
-
ws6.vert_split_pos = 40
|
45
|
-
ws4.vert_split_first_visible = 2
|
46
|
-
|
47
|
-
book.save(__FILE__.gsub(/rb$/, "xls"))
|
48
|
-
|
data/examples/panes.xls
DELETED
Binary file
|
data/examples/protection.rb
DELETED
@@ -1,132 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "surpass"
|
3
|
-
|
4
|
-
fnt = Font.new
|
5
|
-
fnt.name = 'Arial'
|
6
|
-
fnt.colour_index = 4
|
7
|
-
fnt.bold = true
|
8
|
-
|
9
|
-
borders = Borders.new
|
10
|
-
borders.left = 6
|
11
|
-
borders.right = 6
|
12
|
-
borders.top = 6
|
13
|
-
borders.bottom = 6
|
14
|
-
|
15
|
-
style = StyleFormat.new
|
16
|
-
style.font = fnt
|
17
|
-
style.borders = borders
|
18
|
-
|
19
|
-
book = Workbook.new
|
20
|
-
|
21
|
-
ws0 = book.add_sheet('Rows Outline')
|
22
|
-
|
23
|
-
ws0.write_merge(1, 1, 1, 5, 'test 1', style)
|
24
|
-
ws0.write_merge(2, 2, 1, 4, 'test 1', style)
|
25
|
-
ws0.write_merge(3, 3, 1, 3, 'test 2', style)
|
26
|
-
ws0.write_merge(4, 4, 1, 4, 'test 1', style)
|
27
|
-
ws0.write_merge(5, 5, 1, 4, 'test 3', style)
|
28
|
-
ws0.write_merge(6, 6, 1, 5, 'test 1', style)
|
29
|
-
ws0.write_merge(7, 7, 1, 5, 'test 4', style)
|
30
|
-
ws0.write_merge(8, 8, 1, 4, 'test 1', style)
|
31
|
-
ws0.write_merge(9, 9, 1, 3, 'test 5', style)
|
32
|
-
|
33
|
-
ws0.row(1).level = 1
|
34
|
-
ws0.row(2).level = 1
|
35
|
-
ws0.row(3).level = 2
|
36
|
-
ws0.row(4).level = 2
|
37
|
-
ws0.row(5).level = 2
|
38
|
-
ws0.row(6).level = 2
|
39
|
-
ws0.row(7).level = 2
|
40
|
-
ws0.row(8).level = 1
|
41
|
-
ws0.row(9).level = 1
|
42
|
-
|
43
|
-
|
44
|
-
ws1 = book.add_sheet('Columns Outline')
|
45
|
-
|
46
|
-
ws1.write_merge(1, 1, 1, 5, 'test 1', style)
|
47
|
-
ws1.write_merge(2, 2, 1, 4, 'test 1', style)
|
48
|
-
ws1.write_merge(3, 3, 1, 3, 'test 2', style)
|
49
|
-
ws1.write_merge(4, 4, 1, 4, 'test 1', style)
|
50
|
-
ws1.write_merge(5, 5, 1, 4, 'test 3', style)
|
51
|
-
ws1.write_merge(6, 6, 1, 5, 'test 1', style)
|
52
|
-
ws1.write_merge(7, 7, 1, 5, 'test 4', style)
|
53
|
-
ws1.write_merge(8, 8, 1, 4, 'test 1', style)
|
54
|
-
ws1.write_merge(9, 9, 1, 3, 'test 5', style)
|
55
|
-
|
56
|
-
ws1.col(1).level = 1
|
57
|
-
ws1.col(2).level = 1
|
58
|
-
ws1.col(3).level = 2
|
59
|
-
ws1.col(4).level = 2
|
60
|
-
ws1.col(5).level = 2
|
61
|
-
ws1.col(6).level = 2
|
62
|
-
ws1.col(7).level = 2
|
63
|
-
ws1.col(8).level = 1
|
64
|
-
ws1.col(9).level = 1
|
65
|
-
|
66
|
-
|
67
|
-
ws2 = book.add_sheet('Rows and Columns Outline')
|
68
|
-
|
69
|
-
ws2.write_merge(1, 1, 1, 5, 'test 1', style)
|
70
|
-
ws2.write_merge(2, 2, 1, 4, 'test 1', style)
|
71
|
-
ws2.write_merge(3, 3, 1, 3, 'test 2', style)
|
72
|
-
ws2.write_merge(4, 4, 1, 4, 'test 1', style)
|
73
|
-
ws2.write_merge(5, 5, 1, 4, 'test 3', style)
|
74
|
-
ws2.write_merge(6, 6, 1, 5, 'test 1', style)
|
75
|
-
ws2.write_merge(7, 7, 1, 5, 'test 4', style)
|
76
|
-
ws2.write_merge(8, 8, 1, 4, 'test 1', style)
|
77
|
-
ws2.write_merge(9, 9, 1, 3, 'test 5', style)
|
78
|
-
|
79
|
-
ws2.row(1).level = 1
|
80
|
-
ws2.row(2).level = 1
|
81
|
-
ws2.row(3).level = 2
|
82
|
-
ws2.row(4).level = 2
|
83
|
-
ws2.row(5).level = 2
|
84
|
-
ws2.row(6).level = 2
|
85
|
-
ws2.row(7).level = 2
|
86
|
-
ws2.row(8).level = 1
|
87
|
-
ws2.row(9).level = 1
|
88
|
-
|
89
|
-
ws2.write_merge(1, 1, 1, 5, 'test 1', style)
|
90
|
-
ws2.write_merge(2, 2, 1, 4, 'test 1', style)
|
91
|
-
ws2.write_merge(3, 3, 1, 3, 'test 2', style)
|
92
|
-
ws2.write_merge(4, 4, 1, 4, 'test 1', style)
|
93
|
-
ws2.write_merge(5, 5, 1, 4, 'test 3', style)
|
94
|
-
ws2.write_merge(6, 6, 1, 5, 'test 1', style)
|
95
|
-
ws2.write_merge(7, 7, 1, 5, 'test 4', style)
|
96
|
-
ws2.write_merge(8, 8, 1, 4, 'test 1', style)
|
97
|
-
ws2.write_merge(9, 9, 1, 3, 'test 5', style)
|
98
|
-
|
99
|
-
ws2.col(1).level = 1
|
100
|
-
ws2.col(2).level = 1
|
101
|
-
ws2.col(3).level = 2
|
102
|
-
ws2.col(4).level = 2
|
103
|
-
ws2.col(5).level = 2
|
104
|
-
ws2.col(6).level = 2
|
105
|
-
ws2.col(7).level = 2
|
106
|
-
ws2.col(8).level = 1
|
107
|
-
ws2.col(9).level = 1
|
108
|
-
|
109
|
-
|
110
|
-
ws0.protect = true
|
111
|
-
ws0.wnd_protect = true
|
112
|
-
ws0.obj_protect = true
|
113
|
-
ws0.scen_protect = true
|
114
|
-
ws0.password = "123456"
|
115
|
-
|
116
|
-
ws1.protect = true
|
117
|
-
ws1.wnd_protect = true
|
118
|
-
ws1.obj_protect = true
|
119
|
-
ws1.scen_protect = true
|
120
|
-
ws1.password = "abcdefghij"
|
121
|
-
|
122
|
-
ws2.protect = true
|
123
|
-
ws2.wnd_protect = true
|
124
|
-
ws2.obj_protect = true
|
125
|
-
ws2.scen_protect = true
|
126
|
-
ws2.password = "ok"
|
127
|
-
|
128
|
-
book.protect = true
|
129
|
-
book.wnd_protect = true
|
130
|
-
book.obj_protect = true
|
131
|
-
|
132
|
-
book.save(__FILE__.gsub(/rb$/, "xls"))
|
data/examples/protection.xls
DELETED
Binary file
|
data/examples/python.bmp
DELETED
Binary file
|
data/examples/row_styles.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "surpass"
|
3
|
-
|
4
|
-
book = Workbook.new
|
5
|
-
ws = book.add_sheet
|
6
|
-
|
7
|
-
(6..80).each do |i|
|
8
|
-
fnt = Font.new
|
9
|
-
fnt.height = i*20
|
10
|
-
style = StyleFormat.new
|
11
|
-
style.font = fnt
|
12
|
-
ws.write(i, 1, 'Test')
|
13
|
-
ws.row(i).style = style
|
14
|
-
end
|
15
|
-
|
16
|
-
book.save(__FILE__.gsub(/rb$/, "xls"))
|
data/examples/row_styles.xls
DELETED
Binary file
|
@@ -1,15 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "surpass"
|
3
|
-
|
4
|
-
book = Workbook.new
|
5
|
-
ws = book.add_sheet
|
6
|
-
|
7
|
-
(6..80).each do |i|
|
8
|
-
fnt = Font.new
|
9
|
-
fnt.height = i*20
|
10
|
-
style = StyleFormat.new
|
11
|
-
style.font = fnt
|
12
|
-
ws.row(i).style = style
|
13
|
-
end
|
14
|
-
|
15
|
-
book.save(__FILE__.gsub(/rb$/, "xls"))
|
Binary file
|
@@ -1,12 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "surpass"
|
3
|
-
|
4
|
-
book = Workbook.new
|
5
|
-
s = book.add_sheet
|
6
|
-
|
7
|
-
s.write_arrays(0, 0, [%w{a b c d e}, %w{F G H I J}, %w{k l m n o}])
|
8
|
-
|
9
|
-
s.set_cell_style(2, 2, StyleFormat.new(:font_color => "yellow"))
|
10
|
-
s.set_range_style(0..1, 1..2, StyleFormat.new(:font_color => "purple"))
|
11
|
-
|
12
|
-
book.save(__FILE__.gsub(/rb$/, "xls"))
|
Binary file
|
data/examples/wrapped-text.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "surpass"
|
3
|
-
|
4
|
-
text = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
|
5
|
-
|
6
|
-
wrapped_text_format = StyleFormat.new(:text_wrap => true, :text_align => 'justify')
|
7
|
-
|
8
|
-
book = Workbook.new
|
9
|
-
sheet = book.add_sheet('Wrapped Text')
|
10
|
-
sheet.set_column_width(0, 40)
|
11
|
-
sheet.write(0, 0, text, wrapped_text_format)
|
12
|
-
|
13
|
-
book.save(__FILE__.gsub(/rb$/, "xls"))
|
data/examples/wrapped-text.xls
DELETED
Binary file
|
data/examples/write_arrays.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "surpass"
|
3
|
-
|
4
|
-
font0 = Font.new
|
5
|
-
font0.name = 'Times New Roman'
|
6
|
-
|
7
|
-
style0 = StyleFormat.new
|
8
|
-
style0.font = font0
|
9
|
-
|
10
|
-
|
11
|
-
book = Workbook.new
|
12
|
-
s = book.add_sheet
|
13
|
-
|
14
|
-
s.write_array_to_column(methods.sort, 0, 0, style0)
|
15
|
-
|
16
|
-
s.write(5, 5, methods.sort)
|
17
|
-
|
18
|
-
s.write(7, 3, %w{a b c d e})
|
19
|
-
|
20
|
-
s.write(9, 3, [%w{x y z}, [1, 2, 3]])
|
21
|
-
|
22
|
-
book.save(__FILE__.gsub(/rb$/, "xls"))
|
data/examples/write_arrays.xls
DELETED
Binary file
|
data/examples/ws_props.rb
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "surpass"
|
3
|
-
|
4
|
-
props = \
|
5
|
-
[
|
6
|
-
'name',
|
7
|
-
'parent',
|
8
|
-
'rows',
|
9
|
-
'cols',
|
10
|
-
'merged_ranges',
|
11
|
-
'bmp_rec',
|
12
|
-
'show_formulas',
|
13
|
-
'show_grid',
|
14
|
-
'show_headers',
|
15
|
-
'panes_frozen',
|
16
|
-
'show_empty_as_zero',
|
17
|
-
'auto_colour_grid',
|
18
|
-
'cols_right_to_left',
|
19
|
-
'show_outline',
|
20
|
-
'remove_splits',
|
21
|
-
'selected',
|
22
|
-
'page_preview',
|
23
|
-
'first_visible_row',
|
24
|
-
'first_visible_col',
|
25
|
-
'grid_colour',
|
26
|
-
'preview_magn',
|
27
|
-
'normal_magn',
|
28
|
-
'show_auto_page_breaks',
|
29
|
-
'dialogue_sheet',
|
30
|
-
'auto_style_outline',
|
31
|
-
'outline_below',
|
32
|
-
'outline_right',
|
33
|
-
'fit_num_pages',
|
34
|
-
'show_row_outline',
|
35
|
-
'show_col_outline',
|
36
|
-
'alt_expr_eval',
|
37
|
-
'alt_formula_entries',
|
38
|
-
'row_default_height',
|
39
|
-
'col_default_width',
|
40
|
-
'calc_mode',
|
41
|
-
'calc_count',
|
42
|
-
'save_recalc',
|
43
|
-
'print_headers',
|
44
|
-
'print_grid',
|
45
|
-
'grid_set',
|
46
|
-
'vert_page_breaks',
|
47
|
-
'horz_page_breaks',
|
48
|
-
'header_str',
|
49
|
-
'footer_str',
|
50
|
-
'print_centered_vert',
|
51
|
-
'print_centered_horz',
|
52
|
-
'left_margin',
|
53
|
-
'right_margin',
|
54
|
-
'top_margin',
|
55
|
-
'bottom_margin',
|
56
|
-
'paper_size_code',
|
57
|
-
'print_scaling',
|
58
|
-
'start_page_number',
|
59
|
-
'fit_width_to_pages',
|
60
|
-
'fit_height_to_pages',
|
61
|
-
'print_in_rows',
|
62
|
-
'portrait',
|
63
|
-
'print_not_colour',
|
64
|
-
'print_draft',
|
65
|
-
'print_notes',
|
66
|
-
'print_notes_at_end',
|
67
|
-
'print_omit_errors',
|
68
|
-
'print_hres',
|
69
|
-
'print_vres',
|
70
|
-
'header_margin',
|
71
|
-
'footer_margin',
|
72
|
-
'copies_num',
|
73
|
-
]
|
74
|
-
|
75
|
-
book = Workbook.new
|
76
|
-
sheet = book.add_sheet('sheet')
|
77
|
-
|
78
|
-
props.each do |p|
|
79
|
-
puts "#{p} #{sheet.send(p.to_sym)}"
|
80
|
-
end
|