fast_excel 0.2.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.dockerignore +2 -0
- data/.gitignore +7 -0
- data/.travis.yml +32 -9
- data/CHANGELOG.md +36 -1
- data/Dockerfile.test +17 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +33 -24
- data/LICENSE +21 -0
- data/Makefile +13 -0
- data/README.md +177 -40
- data/Rakefile +11 -1
- data/benchmarks/1k_rows.rb +17 -4
- data/benchmarks/20k_rows.rb +4 -0
- data/benchmarks/auto_width.rb +37 -0
- data/benchmarks/init.rb +14 -2
- data/benchmarks/memory.rb +8 -0
- data/benchmarks/profiler.rb +27 -0
- data/benchmarks/write_value.rb +62 -0
- data/examples/example.rb +3 -3
- data/examples/example_auto_width.rb +26 -0
- data/examples/example_filters.rb +36 -0
- data/examples/example_formula.rb +1 -3
- data/examples/example_hyperlink.rb +20 -0
- data/ext/fast_excel/extconf.rb +3 -0
- data/ext/fast_excel/text_width_ext.c +460 -0
- data/fast_excel.gemspec +3 -4
- data/letters.html +114 -0
- data/lib/fast_excel.rb +131 -25
- data/lib/fast_excel/binding.rb +33 -21
- data/lib/fast_excel/binding/chart.rb +20 -1
- data/lib/fast_excel/binding/format.rb +11 -4
- data/lib/fast_excel/binding/workbook.rb +10 -2
- data/lib/fast_excel/binding/worksheet.rb +44 -27
- data/libxlsxwriter/.gitignore +1 -0
- data/libxlsxwriter/.indent.pro +8 -0
- data/libxlsxwriter/.travis.yml +12 -0
- data/libxlsxwriter/CMakeLists.txt +338 -0
- data/libxlsxwriter/CONTRIBUTING.md +1 -1
- data/libxlsxwriter/Changes.txt +162 -0
- data/libxlsxwriter/LICENSE.txt +65 -4
- data/libxlsxwriter/Makefile +33 -11
- data/libxlsxwriter/Readme.md +3 -1
- data/libxlsxwriter/cocoapods/libxlsxwriter-umbrella.h +2 -1
- data/libxlsxwriter/cocoapods/libxlsxwriter.modulemap +2 -2
- data/libxlsxwriter/include/xlsxwriter.h +2 -2
- data/libxlsxwriter/include/xlsxwriter/app.h +2 -2
- data/libxlsxwriter/include/xlsxwriter/chart.h +164 -13
- data/libxlsxwriter/include/xlsxwriter/chartsheet.h +544 -0
- data/libxlsxwriter/include/xlsxwriter/common.h +35 -6
- data/libxlsxwriter/include/xlsxwriter/content_types.h +5 -2
- data/libxlsxwriter/include/xlsxwriter/core.h +2 -2
- data/libxlsxwriter/include/xlsxwriter/custom.h +2 -2
- data/libxlsxwriter/include/xlsxwriter/drawing.h +3 -2
- data/libxlsxwriter/include/xlsxwriter/format.h +8 -8
- data/libxlsxwriter/include/xlsxwriter/hash_table.h +1 -1
- data/libxlsxwriter/include/xlsxwriter/packager.h +18 -8
- data/libxlsxwriter/include/xlsxwriter/relationships.h +2 -2
- data/libxlsxwriter/include/xlsxwriter/shared_strings.h +5 -3
- data/libxlsxwriter/include/xlsxwriter/styles.h +10 -5
- data/libxlsxwriter/include/xlsxwriter/theme.h +2 -2
- data/libxlsxwriter/include/xlsxwriter/utility.h +35 -5
- data/libxlsxwriter/include/xlsxwriter/workbook.h +234 -57
- data/libxlsxwriter/include/xlsxwriter/worksheet.h +780 -91
- data/libxlsxwriter/include/xlsxwriter/xmlwriter.h +4 -2
- data/libxlsxwriter/libxlsxwriter.podspec +4 -2
- data/libxlsxwriter/src/Makefile +31 -6
- data/libxlsxwriter/src/app.c +2 -2
- data/libxlsxwriter/src/chart.c +116 -23
- data/libxlsxwriter/src/chartsheet.c +508 -0
- data/libxlsxwriter/src/content_types.c +12 -4
- data/libxlsxwriter/src/core.c +11 -11
- data/libxlsxwriter/src/custom.c +3 -3
- data/libxlsxwriter/src/drawing.c +114 -17
- data/libxlsxwriter/src/format.c +5 -5
- data/libxlsxwriter/src/hash_table.c +1 -1
- data/libxlsxwriter/src/packager.c +378 -61
- data/libxlsxwriter/src/relationships.c +2 -2
- data/libxlsxwriter/src/shared_strings.c +18 -4
- data/libxlsxwriter/src/styles.c +59 -12
- data/libxlsxwriter/src/theme.c +2 -2
- data/libxlsxwriter/src/utility.c +93 -6
- data/libxlsxwriter/src/workbook.c +379 -61
- data/libxlsxwriter/src/worksheet.c +1240 -174
- data/libxlsxwriter/src/xmlwriter.c +18 -9
- data/libxlsxwriter/third_party/minizip/Makefile +6 -1
- data/libxlsxwriter/third_party/minizip/ioapi.c +10 -0
- data/libxlsxwriter/third_party/minizip/zip.c +2 -0
- data/libxlsxwriter/third_party/tmpfileplus/tmpfileplus.c +2 -2
- data/libxlsxwriter/version.txt +1 -1
- data/test/auto_width_test.rb +19 -0
- data/test/date_test.rb +34 -0
- data/test/format_test.rb +8 -0
- data/test/reopen_test.rb +22 -0
- data/test/test_helper.rb +8 -5
- data/test/text_width_test.rb +80 -0
- data/test/tmpfile_test.rb +1 -0
- data/test/validations_test.rb +47 -0
- data/test/worksheet_test.rb +44 -1
- metadata +33 -9
data/test/worksheet_test.rb
CHANGED
@@ -79,8 +79,51 @@ describe "FastExcel::WorksheetExt append_row" do
|
|
79
79
|
@workbook = FastExcel.open(constant_memory: true)
|
80
80
|
@worksheet = @workbook.add_worksheet
|
81
81
|
|
82
|
-
@worksheet.append_row([BigDecimal
|
82
|
+
@worksheet.append_row([BigDecimal("0.1234")])
|
83
83
|
|
84
84
|
assert_equal([[0.1234]], get_arrays(@workbook))
|
85
85
|
end
|
86
|
+
|
87
|
+
it "should set name correctly" do
|
88
|
+
workbook = FastExcel.open(constant_memory: true)
|
89
|
+
ws1 = workbook.add_worksheet("foo")
|
90
|
+
ws2 = workbook.add_worksheet("")
|
91
|
+
|
92
|
+
assert_equal("foo", ws1[:name])
|
93
|
+
assert_equal("", ws2[:name])
|
94
|
+
end
|
95
|
+
|
96
|
+
it "should map fields correctly" do
|
97
|
+
workbook = FastExcel.open(constant_memory: true)
|
98
|
+
|
99
|
+
ws = workbook.add_worksheet
|
100
|
+
ws.set_right_to_left
|
101
|
+
assert_equal(ws[:right_to_left], 1)
|
102
|
+
|
103
|
+
ws = workbook.add_worksheet
|
104
|
+
ws.center_vertically
|
105
|
+
assert_equal(ws[:print_options_changed], 1)
|
106
|
+
assert_equal(ws[:vcenter], 1)
|
107
|
+
|
108
|
+
ws = workbook.add_worksheet
|
109
|
+
ws.print_row_col_headers
|
110
|
+
assert_equal(ws[:print_headers], 1)
|
111
|
+
assert_equal(ws[:print_options_changed], 1)
|
112
|
+
|
113
|
+
ws = workbook.add_worksheet
|
114
|
+
ws.set_margins(1.5, 2.5, 3.5, 4.5)
|
115
|
+
assert_equal(ws[:margin_left], 1.5)
|
116
|
+
assert_equal(ws[:margin_right], 2.5)
|
117
|
+
assert_equal(ws[:margin_top], 3.5)
|
118
|
+
assert_equal(ws[:margin_bottom], 4.5)
|
119
|
+
|
120
|
+
|
121
|
+
breaks = [20, 40, 60, 20, 0]
|
122
|
+
FFI::MemoryPointer.new(:uint16, breaks.size) do |buffer|
|
123
|
+
buffer.write_array_of_uint16(breaks)
|
124
|
+
ws.set_v_pagebreaks(buffer)
|
125
|
+
end
|
126
|
+
|
127
|
+
assert_equal(ws[:vbreaks_count], 4)
|
128
|
+
end
|
86
129
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fast_excel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Evstigneev
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -38,29 +38,41 @@ extensions:
|
|
38
38
|
- extconf.rb
|
39
39
|
extra_rdoc_files: []
|
40
40
|
files:
|
41
|
+
- ".dockerignore"
|
41
42
|
- ".gitignore"
|
42
43
|
- ".travis.yml"
|
43
44
|
- CHANGELOG.md
|
45
|
+
- Dockerfile.test
|
44
46
|
- Gemfile
|
45
47
|
- Gemfile.lock
|
48
|
+
- LICENSE
|
46
49
|
- Makefile
|
47
50
|
- README.md
|
48
51
|
- Rakefile
|
49
52
|
- appveyor.yml
|
50
53
|
- benchmarks/1k_rows.rb
|
51
54
|
- benchmarks/20k_rows.rb
|
55
|
+
- benchmarks/auto_width.rb
|
52
56
|
- benchmarks/init.rb
|
53
57
|
- benchmarks/memory.rb
|
58
|
+
- benchmarks/profiler.rb
|
59
|
+
- benchmarks/write_value.rb
|
54
60
|
- examples/example.rb
|
55
61
|
- examples/example_align.rb
|
62
|
+
- examples/example_auto_width.rb
|
56
63
|
- examples/example_chart.rb
|
57
64
|
- examples/example_colors.rb
|
65
|
+
- examples/example_filters.rb
|
58
66
|
- examples/example_formula.rb
|
67
|
+
- examples/example_hyperlink.rb
|
59
68
|
- examples/example_image.rb
|
60
69
|
- examples/example_styles.rb
|
61
70
|
- examples/logo.png
|
71
|
+
- ext/fast_excel/extconf.rb
|
72
|
+
- ext/fast_excel/text_width_ext.c
|
62
73
|
- extconf.rb
|
63
74
|
- fast_excel.gemspec
|
75
|
+
- letters.html
|
64
76
|
- lib/fast_excel.rb
|
65
77
|
- lib/fast_excel/binding.rb
|
66
78
|
- lib/fast_excel/binding/chart.rb
|
@@ -70,16 +82,21 @@ files:
|
|
70
82
|
- libxlsxwriter/.gitignore
|
71
83
|
- libxlsxwriter/.indent.pro
|
72
84
|
- libxlsxwriter/.travis.yml
|
85
|
+
- libxlsxwriter/CMakeLists.txt
|
73
86
|
- libxlsxwriter/CONTRIBUTING.md
|
74
87
|
- libxlsxwriter/Changes.txt
|
75
88
|
- libxlsxwriter/LICENSE.txt
|
76
89
|
- libxlsxwriter/Makefile
|
77
90
|
- libxlsxwriter/Readme.md
|
91
|
+
- libxlsxwriter/cmake/FindMINIZIP.cmake
|
92
|
+
- libxlsxwriter/cmake/FindPackage.cmake
|
93
|
+
- libxlsxwriter/cmake/i686-toolchain.cmake
|
78
94
|
- libxlsxwriter/cocoapods/libxlsxwriter-umbrella.h
|
79
95
|
- libxlsxwriter/cocoapods/libxlsxwriter.modulemap
|
80
96
|
- libxlsxwriter/include/xlsxwriter.h
|
81
97
|
- libxlsxwriter/include/xlsxwriter/app.h
|
82
98
|
- libxlsxwriter/include/xlsxwriter/chart.h
|
99
|
+
- libxlsxwriter/include/xlsxwriter/chartsheet.h
|
83
100
|
- libxlsxwriter/include/xlsxwriter/common.h
|
84
101
|
- libxlsxwriter/include/xlsxwriter/content_types.h
|
85
102
|
- libxlsxwriter/include/xlsxwriter/core.h
|
@@ -106,6 +123,7 @@ files:
|
|
106
123
|
- libxlsxwriter/src/Makefile
|
107
124
|
- libxlsxwriter/src/app.c
|
108
125
|
- libxlsxwriter/src/chart.c
|
126
|
+
- libxlsxwriter/src/chartsheet.c
|
109
127
|
- libxlsxwriter/src/content_types.c
|
110
128
|
- libxlsxwriter/src/core.c
|
111
129
|
- libxlsxwriter/src/custom.c
|
@@ -149,34 +167,40 @@ files:
|
|
149
167
|
- libxlsxwriter/third_party/tmpfileplus/tmpfileplus.c
|
150
168
|
- libxlsxwriter/third_party/tmpfileplus/tmpfileplus.h
|
151
169
|
- libxlsxwriter/version.txt
|
170
|
+
- test/auto_width_test.rb
|
152
171
|
- test/date_test.rb
|
153
172
|
- test/default_format_test.rb
|
154
173
|
- test/format_test.rb
|
174
|
+
- test/reopen_test.rb
|
155
175
|
- test/test_helper.rb
|
176
|
+
- test/text_width_test.rb
|
156
177
|
- test/tmpfile_test.rb
|
178
|
+
- test/validations_test.rb
|
157
179
|
- test/worksheet_test.rb
|
158
180
|
homepage: https://github.com/paxa/fast_excel
|
159
181
|
licenses:
|
160
182
|
- MIT
|
161
183
|
metadata: {}
|
162
|
-
post_install_message:
|
184
|
+
post_install_message:
|
163
185
|
rdoc_options: []
|
164
186
|
require_paths:
|
165
187
|
- lib
|
166
188
|
required_ruby_version: !ruby/object:Gem::Requirement
|
167
189
|
requirements:
|
168
|
-
- - "
|
190
|
+
- - ">="
|
169
191
|
- !ruby/object:Gem::Version
|
170
192
|
version: '2.0'
|
193
|
+
- - "<"
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: '4.0'
|
171
196
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
172
197
|
requirements:
|
173
198
|
- - ">="
|
174
199
|
- !ruby/object:Gem::Version
|
175
200
|
version: '0'
|
176
201
|
requirements: []
|
177
|
-
|
178
|
-
|
179
|
-
signing_key:
|
202
|
+
rubygems_version: 3.1.2
|
203
|
+
signing_key:
|
180
204
|
specification_version: 4
|
181
|
-
summary: Ultra Fast Excel
|
205
|
+
summary: Ultra Fast Excel Writer
|
182
206
|
test_files: []
|