xlsxwriter 0.2.1.pre.2 → 0.2.3.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +4 -3
- data/ext/xlsxwriter/chart.c +84 -20
- data/ext/xlsxwriter/chart.h +1 -0
- data/ext/xlsxwriter/chartsheet.c +34 -13
- data/ext/xlsxwriter/common.h +5 -5
- data/ext/xlsxwriter/extconf.rb +8 -8
- data/ext/xlsxwriter/libxlsxwriter/License.txt +24 -2
- data/ext/xlsxwriter/libxlsxwriter/Makefile +46 -12
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/app.h +1 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/chart.h +196 -30
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/chartsheet.h +3 -3
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/comment.h +76 -0
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/common.h +24 -5
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/content_types.h +5 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/core.h +1 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/custom.h +1 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/drawing.h +6 -17
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/format.h +20 -6
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/hash_table.h +1 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/packager.h +3 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/relationships.h +1 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/shared_strings.h +1 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/styles.h +11 -5
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/theme.h +1 -1
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/third_party/md5.h +43 -0
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/utility.h +42 -3
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/vml.h +55 -0
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/workbook.h +83 -18
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/worksheet.h +1519 -109
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter/xmlwriter.h +4 -2
- data/ext/xlsxwriter/libxlsxwriter/include/xlsxwriter.h +3 -2
- data/ext/xlsxwriter/libxlsxwriter/src/Makefile +25 -7
- data/ext/xlsxwriter/libxlsxwriter/src/app.c +1 -1
- data/ext/xlsxwriter/libxlsxwriter/src/chart.c +332 -48
- data/ext/xlsxwriter/libxlsxwriter/src/chartsheet.c +20 -19
- data/ext/xlsxwriter/libxlsxwriter/src/comment.c +443 -0
- data/ext/xlsxwriter/libxlsxwriter/src/content_types.c +20 -1
- data/ext/xlsxwriter/libxlsxwriter/src/core.c +2 -2
- data/ext/xlsxwriter/libxlsxwriter/src/custom.c +1 -1
- data/ext/xlsxwriter/libxlsxwriter/src/drawing.c +58 -20
- data/ext/xlsxwriter/libxlsxwriter/src/format.c +98 -25
- data/ext/xlsxwriter/libxlsxwriter/src/hash_table.c +1 -1
- data/ext/xlsxwriter/libxlsxwriter/src/packager.c +269 -12
- data/ext/xlsxwriter/libxlsxwriter/src/relationships.c +1 -1
- data/ext/xlsxwriter/libxlsxwriter/src/shared_strings.c +2 -4
- data/ext/xlsxwriter/libxlsxwriter/src/styles.c +334 -48
- data/ext/xlsxwriter/libxlsxwriter/src/theme.c +1 -1
- data/ext/xlsxwriter/libxlsxwriter/src/utility.c +71 -8
- data/ext/xlsxwriter/libxlsxwriter/src/vml.c +1032 -0
- data/ext/xlsxwriter/libxlsxwriter/src/workbook.c +343 -27
- data/ext/xlsxwriter/libxlsxwriter/src/worksheet.c +3759 -478
- data/ext/xlsxwriter/libxlsxwriter/src/xmlwriter.c +81 -2
- data/ext/xlsxwriter/libxlsxwriter/third_party/md5/Makefile +42 -0
- data/ext/xlsxwriter/libxlsxwriter/third_party/md5/md5.c +291 -0
- data/ext/xlsxwriter/libxlsxwriter/third_party/md5/md5.h +43 -0
- data/ext/xlsxwriter/rich_string.c +28 -9
- data/ext/xlsxwriter/shared_strings.c +75 -0
- data/ext/xlsxwriter/shared_strings.h +15 -0
- data/ext/xlsxwriter/workbook.c +87 -13
- data/ext/xlsxwriter/workbook.h +1 -0
- data/ext/xlsxwriter/workbook_properties.c +2 -2
- data/ext/xlsxwriter/worksheet.c +75 -23
- data/ext/xlsxwriter/worksheet.h +1 -0
- data/ext/xlsxwriter/xlsxwriter.c +2 -0
- data/lib/xlsxwriter/rich_string.rb +0 -2
- data/lib/xlsxwriter/version.rb +1 -1
- data/lib/xlsxwriter/worksheet.rb +2 -2
- data/test/{run-test.rb → run_test.rb} +3 -3
- data/test/support/chart_test.rb +3 -3
- data/test/support/with_xlsx_file.rb +4 -2
- data/test/support/xlsx_comparable.rb +40 -26
- data/test/test_array_formula.rb +42 -0
- data/test/test_autofilter.rb +72 -0
- data/test/{test-chart-area.rb → test_chart_area.rb} +2 -2
- data/test/{test-chart-axis.rb → test_chart_axis.rb} +16 -16
- data/test/test_chart_bar.rb +382 -0
- data/test/test_chart_blank.rb +27 -0
- data/test/{test-chart-column.rb → test_chart_column.rb} +2 -2
- data/test/{test-chart-doughnut.rb → test_chart_doughnut.rb} +2 -2
- data/test/{test-chart-legend.rb → test_chart_legend.rb} +2 -2
- data/test/{test-chart-pie.rb → test_chart_pie.rb} +2 -2
- data/test/{test-chart-scatter.rb → test_chart_scatter.rb} +3 -4
- data/test/{test-chart-size.rb → test_chart_size.rb} +2 -2
- data/test/{test-chart-title.rb → test_chart_title.rb} +3 -3
- data/test/{test-chartsheet.rb → test_chartsheet.rb} +2 -2
- data/test/{test-data.rb → test_data.rb} +1 -1
- data/test/{test-data-validation.rb → test_data_validation.rb} +23 -24
- data/test/{test-default-row.rb → test_default_row.rb} +1 -1
- data/test/{test-defined-name.rb → test_defined_name.rb} +12 -12
- data/test/{test-escapes.rb → test_escapes.rb} +5 -2
- data/test/{test-fit-to-pages.rb → test_fit_to_pages.rb} +6 -6
- data/test/{test-formatting.rb → test_formatting.rb} +10 -10
- data/test/{test-gridlines.rb → test_gridlines.rb} +3 -3
- data/test/{test-hyperlink.rb → test_hyperlink.rb} +22 -11
- data/test/{test-image.rb → test_image.rb} +6 -4
- data/test/{test-macro.rb → test_macro.rb} +1 -1
- data/test/{test-merge-range.rb → test_merge_range.rb} +1 -1
- data/test/{test-misc.rb → test_misc.rb} +2 -2
- data/test/{test-optimize.rb → test_optimize.rb} +2 -4
- data/test/{test-outline.rb → test_outline.rb} +14 -14
- data/test/{test-page-breaks.rb → test_page_breaks.rb} +2 -2
- data/test/{test-page-setup.rb → test_page_setup.rb} +2 -2
- data/test/{test-panes.rb → test_panes.rb} +1 -1
- data/test/{test-print-area.rb → test_print_area.rb} +3 -3
- data/test/{test-print-options.rb → test_print_options.rb} +7 -7
- data/test/{test-print-scale.rb → test_print_scale.rb} +2 -2
- data/test/{test-properties.rb → test_properties.rb} +2 -2
- data/test/{test-protect.rb → test_protect.rb} +3 -3
- data/test/{test-repeat.rb → test_repeat.rb} +3 -3
- data/test/{test-rich-string.rb → test_rich_string.rb} +5 -9
- data/test/{test-row-col-format.rb → test_row_col_format.rb} +1 -1
- data/test/{test-ruby-worksheet.rb → test_ruby_worksheet.rb} +2 -2
- data/test/{test-set-selection.rb → test_set_selection.rb} +2 -2
- data/test/{test-set-start-page.rb → test_set_start_page.rb} +2 -2
- data/test/{test-simple.rb → test_simple.rb} +10 -10
- data/test/{test-types.rb → test_types.rb} +1 -1
- data/test/{xlsx-func-testcase.rb → xlsx_func_testcase.rb} +1 -0
- metadata +127 -106
- data/test/test-array-formula.rb +0 -35
- data/test/test-autofilter.rb +0 -72
- data/test/test-chart-bar.rb +0 -74
- /data/test/{test-errors.rb → test_errors.rb} +0 -0
data/test/test-array-formula.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative './xlsx-func-testcase'
|
4
|
-
|
5
|
-
class TestArrayFormula < XlsxWriterTestCase
|
6
|
-
def setup
|
7
|
-
omit 'runs wrong test in libxlsxwriter'
|
8
|
-
end
|
9
|
-
|
10
|
-
test 'array_formula01' do |wb|
|
11
|
-
ws = wb.add_worksheet nil
|
12
|
-
ws.write_number(0, 1, 0, nil)
|
13
|
-
ws.write_number(1, 1, 0, nil)
|
14
|
-
ws.write_number(2, 1, 0, nil)
|
15
|
-
ws.write_number(0, 2, 0, nil)
|
16
|
-
ws.write_number(1, 2, 0, nil)
|
17
|
-
ws.write_number(2, 2, 0, nil)
|
18
|
-
|
19
|
-
ws.write_array_formula(0, 0, 2, 0, '{=SUM(B1:C1*B2:C2)}', nil)
|
20
|
-
end
|
21
|
-
|
22
|
-
test 'array_formula02' do |wb|
|
23
|
-
ws = wb.add_worksheet
|
24
|
-
wb.add_format(:bold, bold: true)
|
25
|
-
|
26
|
-
ws.write_number(0, 1, 0, nil);
|
27
|
-
ws.write_number(1, 1, 0, nil);
|
28
|
-
ws.write_number(2, 1, 0, nil);
|
29
|
-
ws.write_number(0, 2, 0, nil);
|
30
|
-
ws.write_number(1, 2, 0, nil);
|
31
|
-
ws.write_number(2, 2, 0, nil);
|
32
|
-
|
33
|
-
ws.write_array_formula(0, 0, 2, 0, '{=SUM(B1:C1*B2:C2)}', :bold)
|
34
|
-
end
|
35
|
-
end
|
data/test/test-autofilter.rb
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative './xlsx-func-testcase'
|
4
|
-
|
5
|
-
class TestAutofilter < XlsxWriterTestCase
|
6
|
-
ROWS = [
|
7
|
-
%w(Region Item Volume Month),
|
8
|
-
[ 'East', 'Apple', 9000, 'July' ],
|
9
|
-
[ 'East', 'Apple', 5000, 'July' ],
|
10
|
-
[ 'South', 'Orange', 9000, 'September' ],
|
11
|
-
[ 'North', 'Apple', 2000, 'November' ],
|
12
|
-
[ 'West', 'Apple', 9000, 'November' ],
|
13
|
-
[ 'South', 'Pear', 7000, 'October' ],
|
14
|
-
[ 'North', 'Pear', 9000, 'August' ],
|
15
|
-
[ 'West', 'Orange', 1000, 'December' ],
|
16
|
-
[ 'West', 'Grape', 1000, 'November' ],
|
17
|
-
[ 'South', 'Pear', 10000, 'April' ],
|
18
|
-
[ 'West', 'Grape', 6000, 'January' ],
|
19
|
-
[ 'South', 'Orange', 3000, 'May' ],
|
20
|
-
[ 'North', 'Apple', 3000, 'December' ],
|
21
|
-
[ 'South', 'Apple', 7000, 'February' ],
|
22
|
-
[ 'West', 'Grape', 1000, 'December' ],
|
23
|
-
[ 'East', 'Grape', 8000, 'February' ],
|
24
|
-
[ 'South', 'Grape', 10000, 'June' ],
|
25
|
-
[ 'West', 'Pear', 7000, 'December' ],
|
26
|
-
[ 'South', 'Apple', 2000, 'October' ],
|
27
|
-
[ 'East', 'Grape', 7000, 'December' ],
|
28
|
-
[ 'North', 'Grape', 6000, 'April' ],
|
29
|
-
[ 'East', 'Pear', 8000, 'February' ],
|
30
|
-
[ 'North', 'Apple', 7000, 'August' ],
|
31
|
-
[ 'North', 'Orange', 7000, 'July' ],
|
32
|
-
[ 'North', 'Apple', 6000, 'June' ],
|
33
|
-
[ 'South', 'Grape', 8000, 'September' ],
|
34
|
-
[ 'West', 'Apple', 3000, 'October' ],
|
35
|
-
[ 'South', 'Orange', 10000, 'November' ],
|
36
|
-
[ 'West', 'Grape', 4000, 'July' ],
|
37
|
-
[ 'North', 'Orange', 5000, 'August' ],
|
38
|
-
[ 'East', 'Orange', 1000, 'November' ],
|
39
|
-
[ 'East', 'Orange', 4000, 'October' ],
|
40
|
-
[ 'North', 'Grape', 5000, 'August' ],
|
41
|
-
[ 'East', 'Apple', 1000, 'December' ],
|
42
|
-
[ 'South', 'Apple', 10000, 'March' ],
|
43
|
-
[ 'East', 'Grape', 7000, 'October' ],
|
44
|
-
[ 'West', 'Grape', 1000, 'September' ],
|
45
|
-
[ 'East', 'Grape', 10000, 'October' ],
|
46
|
-
[ 'South', 'Orange', 8000, 'March' ],
|
47
|
-
[ 'North', 'Apple', 4000, 'July' ],
|
48
|
-
[ 'South', 'Orange', 5000, 'July' ],
|
49
|
-
[ 'West', 'Apple', 4000, 'June' ],
|
50
|
-
[ 'East', 'Apple', 5000, 'April' ],
|
51
|
-
[ 'North', 'Pear', 3000, 'August' ],
|
52
|
-
[ 'East', 'Grape', 9000, 'November' ],
|
53
|
-
[ 'North', 'Orange', 8000, 'October' ],
|
54
|
-
[ 'East', 'Apple', 10000, 'June' ],
|
55
|
-
[ 'South', 'Pear', 1000, 'December' ],
|
56
|
-
[ 'North', 'Grape', 10000, 'July' ],
|
57
|
-
[ 'East', 'Grape', 6000, 'February' ]
|
58
|
-
]
|
59
|
-
|
60
|
-
test 'autofilter00' do |wb|
|
61
|
-
ws = wb.add_worksheet
|
62
|
-
|
63
|
-
ROWS.each { |row| ws.add_row row }
|
64
|
-
end
|
65
|
-
|
66
|
-
test 'autofilter01' do |wb|
|
67
|
-
ws = wb.add_worksheet
|
68
|
-
|
69
|
-
ROWS.each { |row| ws.add_row row }
|
70
|
-
ws.autofilter('A1', 50, 3);
|
71
|
-
end
|
72
|
-
end
|
data/test/test-chart-bar.rb
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative './xlsx-func-testcase'
|
4
|
-
require_relative './support/chart_test'
|
5
|
-
|
6
|
-
class TestChartBar < XlsxWriterTestCase
|
7
|
-
extend ChartTest
|
8
|
-
|
9
|
-
DATA = [
|
10
|
-
[1, 2, 3],
|
11
|
-
[2, 4, 6],
|
12
|
-
[3, 6, 9],
|
13
|
-
[4, 8, 12],
|
14
|
-
[5, 10, 15]
|
15
|
-
]
|
16
|
-
|
17
|
-
chart_test 'chart_bar01', XlsxWriter::Workbook::Chart::BAR do |chart|
|
18
|
-
chart.axis_id_1 = 64_052_224
|
19
|
-
chart.axis_id_2 = 64_055_552
|
20
|
-
|
21
|
-
series1 = chart.add_series
|
22
|
-
series2 = chart.add_series
|
23
|
-
|
24
|
-
series1.set_categories 'Sheet1', 0, 0, 4, 0
|
25
|
-
series1.set_values 'Sheet1', 0, 1, 4, 1
|
26
|
-
|
27
|
-
series2.set_categories 'Sheet1', 0, 0, 4, 0
|
28
|
-
series2.set_values 'Sheet1', 0, 2, 4, 2
|
29
|
-
end
|
30
|
-
|
31
|
-
test 'chart_bar02' do |wb|
|
32
|
-
ws1 = wb.add_worksheet
|
33
|
-
wb.add_worksheet do |ws|
|
34
|
-
DATA.each { |row| ws.add_row row }
|
35
|
-
ws1.write_string('A1', 'Foo')
|
36
|
-
|
37
|
-
wb.add_chart(XlsxWriter::Workbook::Chart::BAR) do |chart|
|
38
|
-
chart.axis_id_1 = 93_218_304
|
39
|
-
chart.axis_id_2 = 93_219_840
|
40
|
-
|
41
|
-
chart.add_series '=Sheet2!$A$1:$A$5', '=Sheet2!$B$1:$B$5'
|
42
|
-
chart.add_series '=Sheet2!$A$1:$A$5', '=Sheet2!$C$1:$C$5'
|
43
|
-
|
44
|
-
ws.insert_chart 'E9', chart
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
test 'chart_bar03' do |wb|
|
50
|
-
wb.add_worksheet do |ws|
|
51
|
-
DATA.each { |row| ws.add_row row }
|
52
|
-
|
53
|
-
wb.add_chart(XlsxWriter::Workbook::Chart::BAR) do |chart|
|
54
|
-
chart.axis_id_1 = 64265216
|
55
|
-
chart.axis_id_2 = 64447616
|
56
|
-
|
57
|
-
chart.add_series '=Sheet1!$A$1:$A$5', '=Sheet1!$B$1:$B$5'
|
58
|
-
chart.add_series '=Sheet1!$A$1:$A$5', '=Sheet1!$C$1:$C$5'
|
59
|
-
|
60
|
-
ws.insert_chart 'E9', chart
|
61
|
-
end
|
62
|
-
|
63
|
-
wb.add_chart(XlsxWriter::Workbook::Chart::BAR) do |chart|
|
64
|
-
chart.axis_id_1 = 86048128
|
65
|
-
chart.axis_id_2 = 86058112
|
66
|
-
|
67
|
-
chart.add_series '=Sheet1!$A$1:$A$4', '=Sheet1!$B$1:$B$4'
|
68
|
-
chart.add_series '=Sheet1!$A$1:$A$4', '=Sheet1!$C$1:$C$4'
|
69
|
-
|
70
|
-
ws.insert_chart 'F25', chart
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
File without changes
|