kmadej_fast_excel_fork 0.2.2

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.
Files changed (119) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +13 -0
  3. data/.travis.yml +28 -0
  4. data/CHANGELOG.md +13 -0
  5. data/Gemfile +17 -0
  6. data/Gemfile.lock +70 -0
  7. data/Makefile +14 -0
  8. data/README.md +95 -0
  9. data/Rakefile +24 -0
  10. data/appveyor.yml +25 -0
  11. data/benchmarks/1k_rows.rb +59 -0
  12. data/benchmarks/20k_rows.rb +26 -0
  13. data/benchmarks/init.rb +59 -0
  14. data/benchmarks/memory.rb +49 -0
  15. data/examples/example.rb +42 -0
  16. data/examples/example_align.rb +23 -0
  17. data/examples/example_chart.rb +21 -0
  18. data/examples/example_colors.rb +37 -0
  19. data/examples/example_formula.rb +18 -0
  20. data/examples/example_image.rb +13 -0
  21. data/examples/example_styles.rb +27 -0
  22. data/examples/logo.png +0 -0
  23. data/extconf.rb +0 -0
  24. data/fast_excel.gemspec +20 -0
  25. data/lib/fast_excel.rb +600 -0
  26. data/lib/fast_excel/binding.rb +2819 -0
  27. data/lib/fast_excel/binding/chart.rb +2666 -0
  28. data/lib/fast_excel/binding/format.rb +1177 -0
  29. data/lib/fast_excel/binding/workbook.rb +338 -0
  30. data/lib/fast_excel/binding/worksheet.rb +1555 -0
  31. data/libxlsxwriter/.gitignore +49 -0
  32. data/libxlsxwriter/.indent.pro +125 -0
  33. data/libxlsxwriter/.travis.yml +25 -0
  34. data/libxlsxwriter/CONTRIBUTING.md +226 -0
  35. data/libxlsxwriter/Changes.txt +557 -0
  36. data/libxlsxwriter/LICENSE.txt +89 -0
  37. data/libxlsxwriter/Makefile +156 -0
  38. data/libxlsxwriter/Readme.md +78 -0
  39. data/libxlsxwriter/cocoapods/libxlsxwriter-umbrella.h +30 -0
  40. data/libxlsxwriter/cocoapods/libxlsxwriter.modulemap +7 -0
  41. data/libxlsxwriter/include/xlsxwriter.h +23 -0
  42. data/libxlsxwriter/include/xlsxwriter/app.h +79 -0
  43. data/libxlsxwriter/include/xlsxwriter/chart.h +3476 -0
  44. data/libxlsxwriter/include/xlsxwriter/common.h +372 -0
  45. data/libxlsxwriter/include/xlsxwriter/content_types.h +74 -0
  46. data/libxlsxwriter/include/xlsxwriter/core.h +51 -0
  47. data/libxlsxwriter/include/xlsxwriter/custom.h +52 -0
  48. data/libxlsxwriter/include/xlsxwriter/drawing.h +111 -0
  49. data/libxlsxwriter/include/xlsxwriter/format.h +1214 -0
  50. data/libxlsxwriter/include/xlsxwriter/hash_table.h +76 -0
  51. data/libxlsxwriter/include/xlsxwriter/packager.h +80 -0
  52. data/libxlsxwriter/include/xlsxwriter/relationships.h +77 -0
  53. data/libxlsxwriter/include/xlsxwriter/shared_strings.h +83 -0
  54. data/libxlsxwriter/include/xlsxwriter/styles.h +77 -0
  55. data/libxlsxwriter/include/xlsxwriter/theme.h +47 -0
  56. data/libxlsxwriter/include/xlsxwriter/third_party/ioapi.h +214 -0
  57. data/libxlsxwriter/include/xlsxwriter/third_party/queue.h +694 -0
  58. data/libxlsxwriter/include/xlsxwriter/third_party/tmpfileplus.h +53 -0
  59. data/libxlsxwriter/include/xlsxwriter/third_party/tree.h +801 -0
  60. data/libxlsxwriter/include/xlsxwriter/third_party/zip.h +375 -0
  61. data/libxlsxwriter/include/xlsxwriter/utility.h +166 -0
  62. data/libxlsxwriter/include/xlsxwriter/workbook.h +757 -0
  63. data/libxlsxwriter/include/xlsxwriter/worksheet.h +2641 -0
  64. data/libxlsxwriter/include/xlsxwriter/xmlwriter.h +178 -0
  65. data/libxlsxwriter/lib/.gitignore +0 -0
  66. data/libxlsxwriter/libxlsxwriter.podspec +47 -0
  67. data/libxlsxwriter/src/Makefile +130 -0
  68. data/libxlsxwriter/src/app.c +443 -0
  69. data/libxlsxwriter/src/chart.c +6346 -0
  70. data/libxlsxwriter/src/content_types.c +345 -0
  71. data/libxlsxwriter/src/core.c +293 -0
  72. data/libxlsxwriter/src/custom.c +224 -0
  73. data/libxlsxwriter/src/drawing.c +746 -0
  74. data/libxlsxwriter/src/format.c +729 -0
  75. data/libxlsxwriter/src/hash_table.c +223 -0
  76. data/libxlsxwriter/src/packager.c +948 -0
  77. data/libxlsxwriter/src/relationships.c +245 -0
  78. data/libxlsxwriter/src/shared_strings.c +266 -0
  79. data/libxlsxwriter/src/styles.c +1088 -0
  80. data/libxlsxwriter/src/theme.c +348 -0
  81. data/libxlsxwriter/src/utility.c +515 -0
  82. data/libxlsxwriter/src/workbook.c +1930 -0
  83. data/libxlsxwriter/src/worksheet.c +5022 -0
  84. data/libxlsxwriter/src/xmlwriter.c +355 -0
  85. data/libxlsxwriter/third_party/minizip/Makefile +44 -0
  86. data/libxlsxwriter/third_party/minizip/Makefile.am +45 -0
  87. data/libxlsxwriter/third_party/minizip/Makefile.orig +25 -0
  88. data/libxlsxwriter/third_party/minizip/MiniZip64_Changes.txt +6 -0
  89. data/libxlsxwriter/third_party/minizip/MiniZip64_info.txt +74 -0
  90. data/libxlsxwriter/third_party/minizip/README.txt +5 -0
  91. data/libxlsxwriter/third_party/minizip/configure.ac +32 -0
  92. data/libxlsxwriter/third_party/minizip/crypt.h +131 -0
  93. data/libxlsxwriter/third_party/minizip/ioapi.c +247 -0
  94. data/libxlsxwriter/third_party/minizip/ioapi.h +208 -0
  95. data/libxlsxwriter/third_party/minizip/iowin32.c +456 -0
  96. data/libxlsxwriter/third_party/minizip/iowin32.h +28 -0
  97. data/libxlsxwriter/third_party/minizip/make_vms.com +25 -0
  98. data/libxlsxwriter/third_party/minizip/miniunz.c +660 -0
  99. data/libxlsxwriter/third_party/minizip/miniunzip.1 +63 -0
  100. data/libxlsxwriter/third_party/minizip/minizip.1 +46 -0
  101. data/libxlsxwriter/third_party/minizip/minizip.c +520 -0
  102. data/libxlsxwriter/third_party/minizip/minizip.pc.in +12 -0
  103. data/libxlsxwriter/third_party/minizip/mztools.c +291 -0
  104. data/libxlsxwriter/third_party/minizip/mztools.h +37 -0
  105. data/libxlsxwriter/third_party/minizip/unzip.c +2125 -0
  106. data/libxlsxwriter/third_party/minizip/unzip.h +437 -0
  107. data/libxlsxwriter/third_party/minizip/zip.c +2007 -0
  108. data/libxlsxwriter/third_party/minizip/zip.h +367 -0
  109. data/libxlsxwriter/third_party/tmpfileplus/Makefile +42 -0
  110. data/libxlsxwriter/third_party/tmpfileplus/tmpfileplus.c +342 -0
  111. data/libxlsxwriter/third_party/tmpfileplus/tmpfileplus.h +53 -0
  112. data/libxlsxwriter/version.txt +1 -0
  113. data/test/date_test.rb +22 -0
  114. data/test/default_format_test.rb +19 -0
  115. data/test/format_test.rb +171 -0
  116. data/test/test_helper.rb +52 -0
  117. data/test/tmpfile_test.rb +23 -0
  118. data/test/worksheet_test.rb +86 -0
  119. metadata +182 -0
@@ -0,0 +1,338 @@
1
+ module Libxlsxwriter
2
+ # = Fields:
3
+ # :constant_memory ::
4
+ # (Integer) Optimize the workbook to use constant memory for worksheets
5
+ # :tmpdir ::
6
+ # (String) Directory to use for the temporary files created by libxlsxwriter.
7
+ class WorkbookOptions < FFI::Struct
8
+ layout :constant_memory, :uchar,
9
+ :tmpdir, :string
10
+ end
11
+
12
+ # = Fields:
13
+ # :file ::
14
+ # (FFI::Pointer(*FILE))
15
+ # :worksheets ::
16
+ # (Worksheets)
17
+ # :worksheet_names ::
18
+ # (WorksheetNames)
19
+ # :charts ::
20
+ # (Charts)
21
+ # :ordered_charts ::
22
+ # (Charts)
23
+ # :formats ::
24
+ # (Formats)
25
+ # :defined_names ::
26
+ # (DefinedNames)
27
+ # :sst ::
28
+ # (Sst)
29
+ # :properties ::
30
+ # (DocProperties)
31
+ # :custom_properties ::
32
+ # (CustomProperties)
33
+ # :filename ::
34
+ # (String)
35
+ # :options ::
36
+ # (WorkbookOptions)
37
+ # :num_sheets ::
38
+ # (Integer)
39
+ # :first_sheet ::
40
+ # (Integer)
41
+ # :active_sheet ::
42
+ # (Integer)
43
+ # :num_xf_formats ::
44
+ # (Integer)
45
+ # :num_format_count ::
46
+ # (Integer)
47
+ # :drawing_count ::
48
+ # (Integer)
49
+ # :font_count ::
50
+ # (Integer)
51
+ # :border_count ::
52
+ # (Integer)
53
+ # :fill_count ::
54
+ # (Integer)
55
+ # :optimize ::
56
+ # (Integer)
57
+ # :has_png ::
58
+ # (Integer)
59
+ # :has_jpeg ::
60
+ # (Integer)
61
+ # :has_bmp ::
62
+ # (Integer)
63
+ # :used_xf_formats ::
64
+ # (HashTable)
65
+ module WorkbookWrappers
66
+ # @param [String] sheetname
67
+ # @return [Worksheet]
68
+ def add_worksheet(sheetname)
69
+ Worksheet.new Libxlsxwriter.workbook_add_worksheet(self, sheetname)
70
+ end
71
+
72
+ # @return [Format]
73
+ def add_format()
74
+ Format.new Libxlsxwriter.workbook_add_format(self)
75
+ end
76
+
77
+ def default_format()
78
+ Format.new Libxlsxwriter.workbook_default_format(self)
79
+ end
80
+
81
+ # @param [Integer] chart_type
82
+ # @return [Chart]
83
+ def add_chart(chart_type)
84
+ Chart.new Libxlsxwriter.workbook_add_chart(self, chart_type)
85
+ end
86
+
87
+ # @return [Symbol from _enum_error_]
88
+ def close()
89
+ Libxlsxwriter.workbook_close(self)
90
+ end
91
+
92
+ # @param [DocProperties] properties
93
+ # @return [Symbol from _enum_error_]
94
+ def set_properties(properties)
95
+ Libxlsxwriter.workbook_set_properties(self, properties)
96
+ end
97
+
98
+ # @param [String] name
99
+ # @param [String] value
100
+ # @return [Symbol from _enum_error_]
101
+ def set_custom_property_string(name, value)
102
+ Libxlsxwriter.workbook_set_custom_property_string(self, name, value)
103
+ end
104
+
105
+ # @param [String] name
106
+ # @param [Float] value
107
+ # @return [Symbol from _enum_error_]
108
+ def set_custom_property_number(name, value)
109
+ Libxlsxwriter.workbook_set_custom_property_number(self, name, value)
110
+ end
111
+
112
+ # @param [String] name
113
+ # @param [Integer] value
114
+ # @return [Symbol from _enum_error_]
115
+ def set_custom_property_integer(name, value)
116
+ Libxlsxwriter.workbook_set_custom_property_integer(self, name, value)
117
+ end
118
+
119
+ # @param [String] name
120
+ # @param [Integer] value
121
+ # @return [Symbol from _enum_error_]
122
+ def set_custom_property_boolean(name, value)
123
+ Libxlsxwriter.workbook_set_custom_property_boolean(self, name, value)
124
+ end
125
+
126
+ # @param [String] name
127
+ # @param [Datetime] datetime
128
+ # @return [Symbol from _enum_error_]
129
+ def set_custom_property_datetime(name, datetime)
130
+ Libxlsxwriter.workbook_set_custom_property_datetime(self, name, datetime)
131
+ end
132
+
133
+ # @param [String] name
134
+ # @param [String] formula
135
+ # @return [Symbol from _enum_error_]
136
+ def define_name(name, formula)
137
+ Libxlsxwriter.workbook_define_name(self, name, formula)
138
+ end
139
+
140
+ # @param [String] name
141
+ # @return [Worksheet]
142
+ def get_worksheet_by_name(name)
143
+ Worksheet.new Libxlsxwriter.workbook_get_worksheet_by_name(self, name)
144
+ end
145
+
146
+ # @param [String] sheetname
147
+ # @return [Symbol from _enum_error_]
148
+ def validate_worksheet_name(sheetname)
149
+ Libxlsxwriter.workbook_validate_worksheet_name(self, sheetname)
150
+ end
151
+
152
+ # @return [nil]
153
+ def free()
154
+ Libxlsxwriter.workbook_free(self)
155
+ end
156
+
157
+ # @return [nil]
158
+ def assemble_xml_file()
159
+ Libxlsxwriter.workbook_assemble_xml_file(self)
160
+ end
161
+
162
+ # @return [nil]
163
+ def set_default_xf_indices()
164
+ Libxlsxwriter.workbook_set_default_xf_indices(self)
165
+ end
166
+ end
167
+
168
+ class Workbook < FFI::Struct
169
+ include WorkbookWrappers
170
+ layout :file, :pointer,
171
+ :worksheets, Worksheets.ptr,
172
+ :worksheet_names, WorksheetNames.ptr,
173
+ :charts, Charts.ptr,
174
+ :ordered_charts, Charts.ptr,
175
+ :formats, Formats.ptr,
176
+ :defined_names, DefinedNames.ptr,
177
+ :sst, Sst.ptr,
178
+ :properties, DocProperties.ptr,
179
+ :custom_properties, CustomProperties.ptr,
180
+ :filename, :pointer,
181
+ :options, WorkbookOptions.by_value,
182
+ :num_sheets, :uint16,
183
+ :first_sheet, :uint16,
184
+ :active_sheet, :uint16,
185
+ :num_xf_formats, :uint16,
186
+ :num_format_count, :uint16,
187
+ :drawing_count, :uint16,
188
+ :font_count, :uint16,
189
+ :border_count, :uint16,
190
+ :fill_count, :uint16,
191
+ :optimize, :uchar,
192
+ :has_png, :uchar,
193
+ :has_jpeg, :uchar,
194
+ :has_bmp, :uchar,
195
+ :used_xf_formats, HashTable.ptr
196
+ end
197
+
198
+ attach_function :workbook_default_format, :workbook_default_format, [Workbook], Format
199
+
200
+ # @method workbook_new(filename)
201
+ # @param [String] filename
202
+ # @return [Workbook]
203
+ # @scope class
204
+ attach_function :workbook_new, :workbook_new, [:string], Workbook
205
+
206
+ # @method workbook_new_opt(filename, options)
207
+ # @param [String] filename
208
+ # @param [WorkbookOptions] options
209
+ # @return [Workbook]
210
+ # @scope class
211
+ attach_function :workbook_new_opt, :workbook_new_opt, [:string, WorkbookOptions], Workbook
212
+
213
+ # @method new_workbook(filename)
214
+ # @param [String] filename
215
+ # @return [Workbook]
216
+ # @scope class
217
+ attach_function :new_workbook, :new_workbook, [:string], Workbook
218
+
219
+ # @method new_workbook_opt(filename, options)
220
+ # @param [String] filename
221
+ # @param [WorkbookOptions] options
222
+ # @return [Workbook]
223
+ # @scope class
224
+ attach_function :new_workbook_opt, :new_workbook_opt, [:string, WorkbookOptions], Workbook
225
+
226
+ # @method workbook_add_worksheet(workbook, sheetname)
227
+ # @param [Workbook] workbook
228
+ # @param [String] sheetname
229
+ # @return [Worksheet]
230
+ # @scope class
231
+ attach_function :workbook_add_worksheet, :workbook_add_worksheet, [Workbook, :string], Worksheet
232
+
233
+ # @method workbook_add_format(workbook)
234
+ # @param [Workbook] workbook
235
+ # @return [Format]
236
+ # @scope class
237
+ attach_function :workbook_add_format, :workbook_add_format, [Workbook], Format
238
+
239
+ # @method workbook_add_chart(workbook, chart_type)
240
+ # @param [Workbook] workbook
241
+ # @param [Integer] chart_type
242
+ # @return [Chart]
243
+ # @scope class
244
+ attach_function :workbook_add_chart, :workbook_add_chart, [Workbook, :uchar], Chart
245
+
246
+ # @method workbook_close(workbook)
247
+ # @param [Workbook] workbook
248
+ # @return [Symbol from _enum_error_]
249
+ # @scope class
250
+ attach_function :workbook_close, :workbook_close, [Workbook], :error
251
+
252
+ # @method workbook_set_properties(workbook, properties)
253
+ # @param [Workbook] workbook
254
+ # @param [DocProperties] properties
255
+ # @return [Symbol from _enum_error_]
256
+ # @scope class
257
+ attach_function :workbook_set_properties, :workbook_set_properties, [Workbook, DocProperties], :error
258
+
259
+ # @method workbook_set_custom_property_string(workbook, name, value)
260
+ # @param [Workbook] workbook
261
+ # @param [String] name
262
+ # @param [String] value
263
+ # @return [Symbol from _enum_error_]
264
+ # @scope class
265
+ attach_function :workbook_set_custom_property_string, :workbook_set_custom_property_string, [Workbook, :string, :string], :error
266
+
267
+ # @method workbook_set_custom_property_number(workbook, name, value)
268
+ # @param [Workbook] workbook
269
+ # @param [String] name
270
+ # @param [Float] value
271
+ # @return [Symbol from _enum_error_]
272
+ # @scope class
273
+ attach_function :workbook_set_custom_property_number, :workbook_set_custom_property_number, [Workbook, :string, :double], :error
274
+
275
+ # @method workbook_set_custom_property_integer(workbook, name, value)
276
+ # @param [Workbook] workbook
277
+ # @param [String] name
278
+ # @param [Integer] value
279
+ # @return [Symbol from _enum_error_]
280
+ # @scope class
281
+ attach_function :workbook_set_custom_property_integer, :workbook_set_custom_property_integer, [Workbook, :string, :int], :error
282
+
283
+ # @method workbook_set_custom_property_boolean(workbook, name, value)
284
+ # @param [Workbook] workbook
285
+ # @param [String] name
286
+ # @param [Integer] value
287
+ # @return [Symbol from _enum_error_]
288
+ # @scope class
289
+ attach_function :workbook_set_custom_property_boolean, :workbook_set_custom_property_boolean, [Workbook, :string, :uchar], :error
290
+
291
+ # @method workbook_set_custom_property_datetime(workbook, name, datetime)
292
+ # @param [Workbook] workbook
293
+ # @param [String] name
294
+ # @param [Datetime] datetime
295
+ # @return [Symbol from _enum_error_]
296
+ # @scope class
297
+ attach_function :workbook_set_custom_property_datetime, :workbook_set_custom_property_datetime, [Workbook, :string, Datetime], :error
298
+
299
+ # @method workbook_define_name(workbook, name, formula)
300
+ # @param [Workbook] workbook
301
+ # @param [String] name
302
+ # @param [String] formula
303
+ # @return [Symbol from _enum_error_]
304
+ # @scope class
305
+ attach_function :workbook_define_name, :workbook_define_name, [Workbook, :string, :string], :error
306
+
307
+ # @method workbook_get_worksheet_by_name(workbook, name)
308
+ # @param [Workbook] workbook
309
+ # @param [String] name
310
+ # @return [Worksheet]
311
+ # @scope class
312
+ attach_function :workbook_get_worksheet_by_name, :workbook_get_worksheet_by_name, [Workbook, :string], Worksheet
313
+
314
+ # @method workbook_validate_worksheet_name(workbook, sheetname)
315
+ # @param [Workbook] workbook
316
+ # @param [String] sheetname
317
+ # @return [Symbol from _enum_error_]
318
+ # @scope class
319
+ attach_function :workbook_validate_worksheet_name, :workbook_validate_worksheet_name, [Workbook, :string], :error
320
+
321
+ # @method workbook_free(workbook)
322
+ # @param [Workbook] workbook
323
+ # @return [nil]
324
+ # @scope class
325
+ attach_function :workbook_free, :lxw_workbook_free, [Workbook], :void
326
+
327
+ # @method workbook_assemble_xml_file(workbook)
328
+ # @param [Workbook] workbook
329
+ # @return [nil]
330
+ # @scope class
331
+ attach_function :workbook_assemble_xml_file, :lxw_workbook_assemble_xml_file, [Workbook], :void
332
+
333
+ # @method workbook_set_default_xf_indices(workbook)
334
+ # @param [Workbook] workbook
335
+ # @return [nil]
336
+ # @scope class
337
+ attach_function :workbook_set_default_xf_indices, :lxw_workbook_set_default_xf_indices, [Workbook], :void
338
+ end
@@ -0,0 +1,1555 @@
1
+ module Libxlsxwriter
2
+ # = Fields:
3
+ # :stqe_next ::
4
+ # (FFI::Pointer(*Worksheet))
5
+ class WorksheetListPointers < FFI::Struct
6
+ layout :stqe_next, :pointer
7
+ end
8
+
9
+ # = Fields:
10
+ # :file ::
11
+ # (FFI::Pointer(*FILE))
12
+ # :optimize_tmpfile ::
13
+ # (FFI::Pointer(*FILE))
14
+ # :table ::
15
+ # (TableRows)
16
+ # :hyperlinks ::
17
+ # (TableRows)
18
+ # :array ::
19
+ # (FFI::Pointer(**Cell))
20
+ # :merged_ranges ::
21
+ # (MergedRanges)
22
+ # :selections ::
23
+ # (Selections)
24
+ # :image_data ::
25
+ # (ImageData)
26
+ # :chart_data ::
27
+ # (ChartData)
28
+ # :dim_rowmin ::
29
+ # (Integer)
30
+ # :dim_rowmax ::
31
+ # (Integer)
32
+ # :dim_colmin ::
33
+ # (Integer)
34
+ # :dim_colmax ::
35
+ # (Integer)
36
+ # :sst ::
37
+ # (Sst)
38
+ # :name ::
39
+ # (String)
40
+ # :quoted_name ::
41
+ # (String)
42
+ # :tmpdir ::
43
+ # (String)
44
+ # :index ::
45
+ # (Integer)
46
+ # :active ::
47
+ # (Integer)
48
+ # :selected ::
49
+ # (Integer)
50
+ # :hidden ::
51
+ # (Integer)
52
+ # :active_sheet ::
53
+ # (FFI::Pointer(*Uint16T))
54
+ # :first_sheet ::
55
+ # (FFI::Pointer(*Uint16T))
56
+ # :col_options ::
57
+ # (FFI::Pointer(**ColOptions))
58
+ # :col_options_max ::
59
+ # (Integer)
60
+ # :col_sizes ::
61
+ # (FFI::Pointer(*Double))
62
+ # :col_sizes_max ::
63
+ # (Integer)
64
+ # :col_formats ::
65
+ # (FFI::Pointer(**Format))
66
+ # :col_formats_max ::
67
+ # (Integer)
68
+ # :col_size_changed ::
69
+ # (Integer)
70
+ # :row_size_changed ::
71
+ # (Integer)
72
+ # :optimize ::
73
+ # (Integer)
74
+ # :optimize_row ::
75
+ # (FFI::Pointer(*Row))
76
+ # :fit_height ::
77
+ # (Integer)
78
+ # :fit_width ::
79
+ # (Integer)
80
+ # :horizontal_dpi ::
81
+ # (Integer)
82
+ # :hlink_count ::
83
+ # (Integer)
84
+ # :page_start ::
85
+ # (Integer)
86
+ # :print_scale ::
87
+ # (Integer)
88
+ # :rel_count ::
89
+ # (Integer)
90
+ # :vertical_dpi ::
91
+ # (Integer)
92
+ # :zoom ::
93
+ # (Integer)
94
+ # :filter_on ::
95
+ # (Integer)
96
+ # :fit_page ::
97
+ # (Integer)
98
+ # :hcenter ::
99
+ # (Integer)
100
+ # :orientation ::
101
+ # (Integer)
102
+ # :outline_changed ::
103
+ # (Integer)
104
+ # :outline_on ::
105
+ # (Integer)
106
+ # :page_order ::
107
+ # (Integer)
108
+ # :page_setup_changed ::
109
+ # (Integer)
110
+ # :page_view ::
111
+ # (Integer)
112
+ # :paper_size ::
113
+ # (Integer)
114
+ # :print_gridlines ::
115
+ # (Integer)
116
+ # :print_headers ::
117
+ # (Integer)
118
+ # :print_options_changed ::
119
+ # (Integer)
120
+ # :right_to_left ::
121
+ # (Integer)
122
+ # :screen_gridlines ::
123
+ # (Integer)
124
+ # :show_zeros ::
125
+ # (Integer)
126
+ # :vba_codename ::
127
+ # (Integer)
128
+ # :vcenter ::
129
+ # (Integer)
130
+ # :zoom_scale_normal ::
131
+ # (Integer)
132
+ # :tab_color ::
133
+ # (Integer)
134
+ # :margin_left ::
135
+ # (Float)
136
+ # :margin_right ::
137
+ # (Float)
138
+ # :margin_top ::
139
+ # (Float)
140
+ # :margin_bottom ::
141
+ # (Float)
142
+ # :margin_header ::
143
+ # (Float)
144
+ # :margin_footer ::
145
+ # (Float)
146
+ # :default_row_height ::
147
+ # (Float)
148
+ # :default_row_pixels ::
149
+ # (Integer)
150
+ # :default_col_pixels ::
151
+ # (Integer)
152
+ # :default_row_zeroed ::
153
+ # (Integer)
154
+ # :default_row_set ::
155
+ # (Integer)
156
+ # :header_footer_changed ::
157
+ # (Integer)
158
+ # :header ::
159
+ # (Array<Integer>)
160
+ # :footer ::
161
+ # (Array<Integer>)
162
+ # :repeat_rows ::
163
+ # (RepeatRows)
164
+ # :repeat_cols ::
165
+ # (RepeatCols)
166
+ # :print_area ::
167
+ # (PrintArea)
168
+ # :autofilter ::
169
+ # (Autofilter)
170
+ # :merged_range_count ::
171
+ # (Integer)
172
+ # :hbreaks ::
173
+ # (FFI::Pointer(*RowT))
174
+ # :vbreaks ::
175
+ # (FFI::Pointer(*ColT))
176
+ # :hbreaks_count ::
177
+ # (Integer)
178
+ # :vbreaks_count ::
179
+ # (Integer)
180
+ # :external_hyperlinks ::
181
+ # (FFI::Pointer(*RelTuples))
182
+ # :external_drawing_links ::
183
+ # (FFI::Pointer(*RelTuples))
184
+ # :drawing_links ::
185
+ # (FFI::Pointer(*RelTuples))
186
+ # :panes ::
187
+ # (Panes)
188
+ # :protection ::
189
+ # (Protection)
190
+ # :drawing ::
191
+ # (Drawing)
192
+ # :list_pointers ::
193
+ # (WorksheetListPointers)
194
+ module WorksheetWrappers
195
+ # @param [Integer] row
196
+ # @param [Integer] col
197
+ # @param [Float] number
198
+ # @param [Format] format
199
+ # @return [Symbol from _enum_error_]
200
+ def write_number(row, col, number, format)
201
+ Libxlsxwriter.worksheet_write_number(self, row, col, number, format)
202
+ end
203
+
204
+ # @param [Integer] row
205
+ # @param [Integer] col
206
+ # @param [String] string
207
+ # @param [Format] format
208
+ # @return [Symbol from _enum_error_]
209
+ def write_string(row, col, string, format)
210
+ Libxlsxwriter.worksheet_write_string(self, row, col, string, format)
211
+ end
212
+
213
+ # @param [Integer] row
214
+ # @param [Integer] col
215
+ # @param [String] formula
216
+ # @param [Format] format
217
+ # @return [Symbol from _enum_error_]
218
+ def write_formula(row, col, formula, format)
219
+ Libxlsxwriter.worksheet_write_formula(self, row, col, formula, format)
220
+ end
221
+
222
+ # @param [Integer] first_row
223
+ # @param [Integer] first_col
224
+ # @param [Integer] last_row
225
+ # @param [Integer] last_col
226
+ # @param [String] formula
227
+ # @param [Format] format
228
+ # @return [Symbol from _enum_error_]
229
+ def write_array_formula(first_row, first_col, last_row, last_col, formula, format)
230
+ Libxlsxwriter.worksheet_write_array_formula(self, first_row, first_col, last_row, last_col, formula, format)
231
+ end
232
+
233
+ # @param [Integer] first_row
234
+ # @param [Integer] first_col
235
+ # @param [Integer] last_row
236
+ # @param [Integer] last_col
237
+ # @param [String] formula
238
+ # @param [Format] format
239
+ # @param [Float] result
240
+ # @return [Symbol from _enum_error_]
241
+ def write_array_formula_num(first_row, first_col, last_row, last_col, formula, format, result)
242
+ Libxlsxwriter.worksheet_write_array_formula_num(self, first_row, first_col, last_row, last_col, formula, format, result)
243
+ end
244
+
245
+ # @param [Integer] row
246
+ # @param [Integer] col
247
+ # @param [Datetime] datetime
248
+ # @param [Format] format
249
+ # @return [Symbol from _enum_error_]
250
+ def write_datetime(row, col, datetime, format)
251
+ Libxlsxwriter.worksheet_write_datetime(self, row, col, datetime, format)
252
+ end
253
+
254
+ # @param [Integer] row_num
255
+ # @param [Integer] col_num
256
+ # @param [String] url
257
+ # @param [Format] format
258
+ # @param [String] string
259
+ # @param [String] tooltip
260
+ # @return [Symbol from _enum_error_]
261
+ def write_url_opt(row_num, col_num, url, format, string, tooltip)
262
+ Libxlsxwriter.worksheet_write_url_opt(self, row_num, col_num, url, format, string, tooltip)
263
+ end
264
+
265
+ # @param [Integer] row
266
+ # @param [Integer] col
267
+ # @param [String] url
268
+ # @param [Format] format
269
+ # @return [Symbol from _enum_error_]
270
+ def write_url(row, col, url, format)
271
+ Libxlsxwriter.worksheet_write_url(self, row, col, url, format)
272
+ end
273
+
274
+ # @param [Integer] row
275
+ # @param [Integer] col
276
+ # @param [Integer] value
277
+ # @param [Format] format
278
+ # @return [Symbol from _enum_error_]
279
+ def write_boolean(row, col, value, format)
280
+ Libxlsxwriter.worksheet_write_boolean(self, row, col, value, format)
281
+ end
282
+
283
+ # @param [Integer] row
284
+ # @param [Integer] col
285
+ # @param [Format] format
286
+ # @return [Symbol from _enum_error_]
287
+ def write_blank(row, col, format)
288
+ Libxlsxwriter.worksheet_write_blank(self, row, col, format)
289
+ end
290
+
291
+ # @param [Integer] row
292
+ # @param [Integer] col
293
+ # @param [String] formula
294
+ # @param [Format] format
295
+ # @param [Float] result
296
+ # @return [Symbol from _enum_error_]
297
+ def write_formula_num(row, col, formula, format, result)
298
+ Libxlsxwriter.worksheet_write_formula_num(self, row, col, formula, format, result)
299
+ end
300
+
301
+ # @param [Integer] row
302
+ # @param [Float] height
303
+ # @param [Format] format
304
+ # @return [Symbol from _enum_error_]
305
+ def set_row(row, height, format)
306
+ Libxlsxwriter.worksheet_set_row(self, row, height, format)
307
+ end
308
+
309
+ # @param [Integer] row
310
+ # @param [Float] height
311
+ # @param [Format] format
312
+ # @param [RowColOptions] options
313
+ # @return [Symbol from _enum_error_]
314
+ def set_row_opt(row, height, format, options)
315
+ Libxlsxwriter.worksheet_set_row_opt(self, row, height, format, options)
316
+ end
317
+
318
+ # @param [Integer] first_col
319
+ # @param [Integer] last_col
320
+ # @param [Float] width
321
+ # @param [Format] format
322
+ # @return [Symbol from _enum_error_]
323
+ def set_column(first_col, last_col, width, format)
324
+ Libxlsxwriter.worksheet_set_column(self, first_col, last_col, width, format)
325
+ end
326
+
327
+ # @param [Integer] first_col
328
+ # @param [Integer] last_col
329
+ # @param [Float] width
330
+ # @param [Format] format
331
+ # @param [RowColOptions] options
332
+ # @return [Symbol from _enum_error_]
333
+ def set_column_opt(first_col, last_col, width, format, options)
334
+ Libxlsxwriter.worksheet_set_column_opt(self, first_col, last_col, width, format, options)
335
+ end
336
+
337
+ # @param [Integer] row
338
+ # @param [Integer] col
339
+ # @param [String] filename
340
+ # @return [Symbol from _enum_error_]
341
+ def insert_image(row, col, filename)
342
+ Libxlsxwriter.worksheet_insert_image(self, row, col, filename)
343
+ end
344
+
345
+ # @param [Integer] row
346
+ # @param [Integer] col
347
+ # @param [String] filename
348
+ # @param [ImageOptions] options
349
+ # @return [Symbol from _enum_error_]
350
+ def insert_image_opt(row, col, filename, options)
351
+ Libxlsxwriter.worksheet_insert_image_opt(self, row, col, filename, options)
352
+ end
353
+
354
+ # @param [Integer] row
355
+ # @param [Integer] col
356
+ # @param [Chart] chart
357
+ # @return [Symbol from _enum_error_]
358
+ def insert_chart(row, col, chart)
359
+ Libxlsxwriter.worksheet_insert_chart(self, row, col, chart)
360
+ end
361
+
362
+ # @param [Integer] row
363
+ # @param [Integer] col
364
+ # @param [Chart] chart
365
+ # @param [ImageOptions] user_options
366
+ # @return [Symbol from _enum_error_]
367
+ def insert_chart_opt(row, col, chart, user_options)
368
+ Libxlsxwriter.worksheet_insert_chart_opt(self, row, col, chart, user_options)
369
+ end
370
+
371
+ # @param [Integer] first_row
372
+ # @param [Integer] first_col
373
+ # @param [Integer] last_row
374
+ # @param [Integer] last_col
375
+ # @param [String] string
376
+ # @param [Format] format
377
+ # @return [Symbol from _enum_error_]
378
+ def merge_range(first_row, first_col, last_row, last_col, string, format)
379
+ Libxlsxwriter.worksheet_merge_range(self, first_row, first_col, last_row, last_col, string, format)
380
+ end
381
+
382
+ # @param [Integer] first_row
383
+ # @param [Integer] first_col
384
+ # @param [Integer] last_row
385
+ # @param [Integer] last_col
386
+ # @return [Symbol from _enum_error_]
387
+ def autofilter(first_row, first_col, last_row, last_col)
388
+ Libxlsxwriter.worksheet_autofilter(self, first_row, first_col, last_row, last_col)
389
+ end
390
+
391
+ # @return [nil]
392
+ def activate()
393
+ Libxlsxwriter.worksheet_activate(self)
394
+ end
395
+
396
+ # @return [nil]
397
+ def select()
398
+ Libxlsxwriter.worksheet_select(self)
399
+ end
400
+
401
+ # @return [nil]
402
+ def hide()
403
+ Libxlsxwriter.worksheet_hide(self)
404
+ end
405
+
406
+ # @return [nil]
407
+ def set_first_sheet()
408
+ Libxlsxwriter.worksheet_set_first_sheet(self)
409
+ end
410
+
411
+ # @param [Integer] row
412
+ # @param [Integer] col
413
+ # @return [nil]
414
+ def freeze_panes(row, col)
415
+ Libxlsxwriter.worksheet_freeze_panes(self, row, col)
416
+ end
417
+
418
+ # @param [Float] vertical
419
+ # @param [Float] horizontal
420
+ # @return [nil]
421
+ def split_panes(vertical, horizontal)
422
+ Libxlsxwriter.worksheet_split_panes(self, vertical, horizontal)
423
+ end
424
+
425
+ # @param [Integer] first_row
426
+ # @param [Integer] first_col
427
+ # @param [Integer] top_row
428
+ # @param [Integer] left_col
429
+ # @param [Integer] type
430
+ # @return [nil]
431
+ def freeze_panes_opt(first_row, first_col, top_row, left_col, type)
432
+ Libxlsxwriter.worksheet_freeze_panes_opt(self, first_row, first_col, top_row, left_col, type)
433
+ end
434
+
435
+ # @param [Float] vertical
436
+ # @param [Float] horizontal
437
+ # @param [Integer] top_row
438
+ # @param [Integer] left_col
439
+ # @return [nil]
440
+ def split_panes_opt(vertical, horizontal, top_row, left_col)
441
+ Libxlsxwriter.worksheet_split_panes_opt(self, vertical, horizontal, top_row, left_col)
442
+ end
443
+
444
+ # @param [Integer] first_row
445
+ # @param [Integer] first_col
446
+ # @param [Integer] last_row
447
+ # @param [Integer] last_col
448
+ # @return [nil]
449
+ def set_selection(first_row, first_col, last_row, last_col)
450
+ Libxlsxwriter.worksheet_set_selection(self, first_row, first_col, last_row, last_col)
451
+ end
452
+
453
+ # @return [nil]
454
+ def set_landscape()
455
+ Libxlsxwriter.worksheet_set_landscape(self)
456
+ end
457
+
458
+ # @return [nil]
459
+ def set_portrait()
460
+ Libxlsxwriter.worksheet_set_portrait(self)
461
+ end
462
+
463
+ # @return [nil]
464
+ def set_page_view()
465
+ Libxlsxwriter.worksheet_set_page_view(self)
466
+ end
467
+
468
+ # @param [Integer] paper_type
469
+ # @return [nil]
470
+ def set_paper(paper_type)
471
+ Libxlsxwriter.worksheet_set_paper(self, paper_type)
472
+ end
473
+
474
+ # @param [Float] left
475
+ # @param [Float] right
476
+ # @param [Float] top
477
+ # @param [Float] bottom
478
+ # @return [nil]
479
+ def set_margins(left, right, top, bottom)
480
+ Libxlsxwriter.worksheet_set_margins(self, left, right, top, bottom)
481
+ end
482
+
483
+ # @param [String] string
484
+ # @return [Symbol from _enum_error_]
485
+ def set_header(string)
486
+ Libxlsxwriter.worksheet_set_header(self, string)
487
+ end
488
+
489
+ # @param [String] string
490
+ # @return [Symbol from _enum_error_]
491
+ def set_footer(string)
492
+ Libxlsxwriter.worksheet_set_footer(self, string)
493
+ end
494
+
495
+ # @param [String] string
496
+ # @param [HeaderFooterOptions] options
497
+ # @return [Symbol from _enum_error_]
498
+ def set_header_opt(string, options)
499
+ Libxlsxwriter.worksheet_set_header_opt(self, string, options)
500
+ end
501
+
502
+ # @param [String] string
503
+ # @param [HeaderFooterOptions] options
504
+ # @return [Symbol from _enum_error_]
505
+ def set_footer_opt(string, options)
506
+ Libxlsxwriter.worksheet_set_footer_opt(self, string, options)
507
+ end
508
+
509
+ # @param [FFI::Pointer(*U_int)] breaks
510
+ # @return [Symbol from _enum_error_]
511
+ def set_h_pagebreaks(breaks)
512
+ Libxlsxwriter.worksheet_set_h_pagebreaks(self, breaks)
513
+ end
514
+
515
+ # @param [FFI::Pointer(*U_short)] breaks
516
+ # @return [Symbol from _enum_error_]
517
+ def set_v_pagebreaks(breaks)
518
+ Libxlsxwriter.worksheet_set_v_pagebreaks(self, breaks)
519
+ end
520
+
521
+ # @return [nil]
522
+ def print_across()
523
+ Libxlsxwriter.worksheet_print_across(self)
524
+ end
525
+
526
+ # @param [Integer] scale
527
+ # @return [nil]
528
+ def set_zoom(scale)
529
+ Libxlsxwriter.worksheet_set_zoom(self, scale)
530
+ end
531
+
532
+ # @param [Integer] option
533
+ # @return [nil]
534
+ def gridlines(option)
535
+ Libxlsxwriter.worksheet_gridlines(self, option)
536
+ end
537
+
538
+ # @return [nil]
539
+ def center_horizontally()
540
+ Libxlsxwriter.worksheet_center_horizontally(self)
541
+ end
542
+
543
+ # @return [nil]
544
+ def center_vertically()
545
+ Libxlsxwriter.worksheet_center_vertically(self)
546
+ end
547
+
548
+ # @return [nil]
549
+ def print_row_col_headers()
550
+ Libxlsxwriter.worksheet_print_row_col_headers(self)
551
+ end
552
+
553
+ # @param [Integer] first_row
554
+ # @param [Integer] last_row
555
+ # @return [Symbol from _enum_error_]
556
+ def repeat_rows(first_row, last_row)
557
+ Libxlsxwriter.worksheet_repeat_rows(self, first_row, last_row)
558
+ end
559
+
560
+ # @param [Integer] first_col
561
+ # @param [Integer] last_col
562
+ # @return [Symbol from _enum_error_]
563
+ def repeat_columns(first_col, last_col)
564
+ Libxlsxwriter.worksheet_repeat_columns(self, first_col, last_col)
565
+ end
566
+
567
+ # @param [Integer] first_row
568
+ # @param [Integer] first_col
569
+ # @param [Integer] last_row
570
+ # @param [Integer] last_col
571
+ # @return [Symbol from _enum_error_]
572
+ def print_area(first_row, first_col, last_row, last_col)
573
+ Libxlsxwriter.worksheet_print_area(self, first_row, first_col, last_row, last_col)
574
+ end
575
+
576
+ # @param [Integer] width
577
+ # @param [Integer] height
578
+ # @return [nil]
579
+ def fit_to_pages(width, height)
580
+ Libxlsxwriter.worksheet_fit_to_pages(self, width, height)
581
+ end
582
+
583
+ # @param [Integer] start_page
584
+ # @return [nil]
585
+ def set_start_page(start_page)
586
+ Libxlsxwriter.worksheet_set_start_page(self, start_page)
587
+ end
588
+
589
+ # @param [Integer] scale
590
+ # @return [nil]
591
+ def set_print_scale(scale)
592
+ Libxlsxwriter.worksheet_set_print_scale(self, scale)
593
+ end
594
+
595
+ # @return [nil]
596
+ def right_to_left()
597
+ Libxlsxwriter.worksheet_right_to_left(self)
598
+ end
599
+
600
+ # @return [nil]
601
+ def hide_zero()
602
+ Libxlsxwriter.worksheet_hide_zero(self)
603
+ end
604
+
605
+ # @param [Integer] color
606
+ # @return [nil]
607
+ def set_tab_color(color)
608
+ Libxlsxwriter.worksheet_set_tab_color(self, color)
609
+ end
610
+
611
+ # @param [String] password
612
+ # @param [Protection] options
613
+ # @return [nil]
614
+ def protect(password, options)
615
+ Libxlsxwriter.worksheet_protect(self, password, options)
616
+ end
617
+
618
+ # @param [Float] height
619
+ # @param [Integer] hide_unused_rows
620
+ # @return [nil]
621
+ def set_default_row(height, hide_unused_rows)
622
+ Libxlsxwriter.worksheet_set_default_row(self, height, hide_unused_rows)
623
+ end
624
+
625
+ # @return [nil]
626
+ def free()
627
+ Libxlsxwriter.worksheet_free(self)
628
+ end
629
+
630
+ # @return [nil]
631
+ def assemble_xml_file()
632
+ Libxlsxwriter.worksheet_assemble_xml_file(self)
633
+ end
634
+
635
+ # @return [nil]
636
+ def write_single_row()
637
+ Libxlsxwriter.worksheet_write_single_row(self)
638
+ end
639
+
640
+ # @param [Integer] image_ref_id
641
+ # @param [Integer] drawing_id
642
+ # @param [ImageOptions] image_data
643
+ # @return [nil]
644
+ def prepare_image(image_ref_id, drawing_id, image_data)
645
+ Libxlsxwriter.worksheet_prepare_image(self, image_ref_id, drawing_id, image_data)
646
+ end
647
+
648
+ # @param [Integer] chart_ref_id
649
+ # @param [Integer] drawing_id
650
+ # @param [ImageOptions] image_data
651
+ # @return [nil]
652
+ def prepare_chart(chart_ref_id, drawing_id, image_data)
653
+ Libxlsxwriter.worksheet_prepare_chart(self, chart_ref_id, drawing_id, image_data)
654
+ end
655
+
656
+ # @param [Integer] row_num
657
+ # @return [Row]
658
+ def find_row(row_num)
659
+ Row.new(Libxlsxwriter.worksheet_find_row(self, row_num))
660
+ end
661
+ end
662
+
663
+ # = Fields:
664
+ # :rbh_root ::
665
+ # (FFI::Pointer(*Cell))
666
+ class TableCells < FFI::Struct
667
+ layout :rbh_root, :pointer
668
+ end
669
+
670
+ # = Fields:
671
+ # :rbh_root ::
672
+ # (FFI::Pointer(*Row))
673
+ # :cached_row ::
674
+ # (FFI::Pointer(*Row))
675
+ # :cached_row_num ::
676
+ # (Integer)
677
+ class TableRows < FFI::Struct
678
+ layout :rbh_root, :pointer,
679
+ :cached_row, :pointer,
680
+ :cached_row_num, :uint32
681
+ end
682
+
683
+ class Worksheet < FFI::Struct
684
+ include WorksheetWrappers
685
+ layout :file, :pointer,
686
+ :optimize_tmpfile, :pointer,
687
+ :table, TableRows.ptr,
688
+ :hyperlinks, TableRows.ptr,
689
+ :array, :pointer,
690
+ :merged_ranges, MergedRanges.ptr,
691
+ :selections, Selections.ptr,
692
+ :image_data, ImageData.ptr,
693
+ :chart_data, ChartData.ptr,
694
+ :dim_rowmin, :uint32,
695
+ :dim_rowmax, :uint32,
696
+ :dim_colmin, :uint16,
697
+ :dim_colmax, :uint16,
698
+ :sst, Sst.ptr,
699
+ :name, :string,
700
+ :quoted_name, :string,
701
+ :tmpdir, :pointer,
702
+ :index, :uint32,
703
+ :active, :uint8,
704
+ :selected, :uint8,
705
+ :hidden, :uint8,
706
+ :active_sheet, :pointer,
707
+ :first_sheet, :pointer,
708
+ :col_options, :pointer,
709
+ :col_options_max, :uint16,
710
+ :col_sizes, :pointer,
711
+ :col_sizes_max, :uint16,
712
+ :col_formats, :pointer,
713
+ :col_formats_max, :uint16,
714
+ :col_size_changed, :uint8,
715
+ :row_size_changed, :uint8,
716
+ :optimize, :uint8,
717
+ :optimize_row, :pointer,
718
+ :fit_height, :uint16,
719
+ :fit_width, :uint16,
720
+ :horizontal_dpi, :uint16,
721
+ :hlink_count, :uint16,
722
+ :page_start, :uint16,
723
+ :print_scale, :uint16,
724
+ :rel_count, :uint16,
725
+ :vertical_dpi, :uint16,
726
+ :zoom, :uint16,
727
+ :filter_on, :uint8,
728
+ :fit_page, :uint8,
729
+ :hcenter, :uint8,
730
+ :orientation, :uint8,
731
+ :outline_changed, :uint8,
732
+ :outline_on, :uint8,
733
+ :page_order, :uint8,
734
+ :page_setup_changed, :uint8,
735
+ :page_view, :uint8,
736
+ :paper_size, :uint8,
737
+ :print_gridlines, :uint8,
738
+ :print_headers, :uint8,
739
+ :print_options_changed, :uint8,
740
+ :right_to_left, :uint8,
741
+ :screen_gridlines, :uint8,
742
+ :show_zeros, :uint8,
743
+ :vba_codename, :uint8,
744
+ :vcenter, :uint8,
745
+ :zoom_scale_normal, :uint8,
746
+ :tab_color, :int,
747
+ :margin_left, :double,
748
+ :margin_right, :double,
749
+ :margin_top, :double,
750
+ :margin_bottom, :double,
751
+ :margin_header, :double,
752
+ :margin_footer, :double,
753
+ :default_row_height, :double,
754
+ :default_row_pixels, :uint,
755
+ :default_col_pixels, :uint,
756
+ :default_row_zeroed, :uchar,
757
+ :default_row_set, :uint8,
758
+ :header_footer_changed, :uint8,
759
+ :header, [:char, 255],
760
+ :footer, [:char, 255],
761
+ :repeat_rows, RepeatRows.by_value,
762
+ :repeat_cols, RepeatCols.by_value,
763
+ :print_area, PrintArea.by_value,
764
+ :autofilter, Autofilter.by_value,
765
+ :merged_range_count, :uint16,
766
+ :hbreaks, :pointer,
767
+ :vbreaks, :pointer,
768
+ :hbreaks_count, :uint16,
769
+ :vbreaks_count, :uint16,
770
+ :external_hyperlinks, :pointer,
771
+ :external_drawing_links, :pointer,
772
+ :drawing_links, :pointer,
773
+ :panes, Panes.by_value,
774
+ :protection, Protection.by_value,
775
+ :drawing, Drawing.ptr,
776
+ :list_pointers, WorksheetListPointers.by_value
777
+ end
778
+
779
+ # = Fields:
780
+ # :index ::
781
+ # (Integer)
782
+ # :hidden ::
783
+ # (Integer)
784
+ # :optimize ::
785
+ # (Integer)
786
+ # :active_sheet ::
787
+ # (FFI::Pointer(*Uint16T))
788
+ # :first_sheet ::
789
+ # (FFI::Pointer(*Uint16T))
790
+ # :sst ::
791
+ # (Sst)
792
+ # :name ::
793
+ # (String)
794
+ # :quoted_name ::
795
+ # (String)
796
+ # :tmpdir ::
797
+ # (String)
798
+ class WorksheetInitData < FFI::Struct
799
+ layout :index, :uint,
800
+ :hidden, :uchar,
801
+ :optimize, :uchar,
802
+ :active_sheet, :pointer,
803
+ :first_sheet, :pointer,
804
+ :sst, Sst,
805
+ :name, :string,
806
+ :quoted_name, :string,
807
+ :tmpdir, :string
808
+ end
809
+
810
+ # = Fields:
811
+ # :rbe_left ::
812
+ # (FFI::Pointer(*Row))
813
+ # :rbe_right ::
814
+ # (FFI::Pointer(*Row))
815
+ # :rbe_parent ::
816
+ # (FFI::Pointer(*Row))
817
+ # :rbe_color ::
818
+ # (Integer)
819
+ class RowTreePointers < FFI::Struct
820
+ layout :rbe_left, :pointer,
821
+ :rbe_right, :pointer,
822
+ :rbe_parent, :pointer,
823
+ :rbe_color, :int
824
+ end
825
+
826
+ # = Fields:
827
+ # :row_num ::
828
+ # (Integer)
829
+ # :height ::
830
+ # (Float)
831
+ # :format ::
832
+ # (Format)
833
+ # :hidden ::
834
+ # (Integer)
835
+ # :level ::
836
+ # (Integer)
837
+ # :collapsed ::
838
+ # (Integer)
839
+ # :row_changed ::
840
+ # (Integer)
841
+ # :data_changed ::
842
+ # (Integer)
843
+ # :height_changed ::
844
+ # (Integer)
845
+ # :cells ::
846
+ # (TableCells)
847
+ # :tree_pointers ::
848
+ # (RowTreePointers)
849
+ class Row < FFI::Struct
850
+ layout :row_num, :uint32,
851
+ :height, :double,
852
+ :format, Format,
853
+ :hidden, :uchar,
854
+ :level, :uchar,
855
+ :collapsed, :uchar,
856
+ :row_changed, :uchar,
857
+ :data_changed, :uchar,
858
+ :height_changed, :uchar,
859
+ :cells, TableCells,
860
+ :tree_pointers, RowTreePointers.by_value
861
+ end
862
+
863
+ # <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:cell_types).</em>
864
+ #
865
+ # === Options:
866
+ # :number_cell ::
867
+ #
868
+ # :string_cell ::
869
+ #
870
+ # :inline_string_cell ::
871
+ #
872
+ # :formula_cell ::
873
+ #
874
+ # :array_formula_cell ::
875
+ #
876
+ # :blank_cell ::
877
+ #
878
+ # :boolean_cell ::
879
+ #
880
+ # :hyperlink_url ::
881
+ #
882
+ # :hyperlink_internal ::
883
+ #
884
+ # :hyperlink_external ::
885
+ #
886
+ #
887
+ # @method _enum_cell_types_
888
+ # @return [Symbol]
889
+ # @scope class
890
+ enum :cell_types, [
891
+ :number_cell, 1,
892
+ :string_cell, 2,
893
+ :inline_string_cell, 3,
894
+ :formula_cell, 4,
895
+ :array_formula_cell, 5,
896
+ :blank_cell, 6,
897
+ :boolean_cell, 7,
898
+ :hyperlink_url, 8,
899
+ :hyperlink_internal, 9,
900
+ :hyperlink_external, 10
901
+ ]
902
+
903
+ # = Fields:
904
+ # :number ::
905
+ # (Float)
906
+ # :string_id ::
907
+ # (Integer)
908
+ # :string ::
909
+ # (String)
910
+ class CellU < FFI::Union
911
+ layout :number, :double,
912
+ :string_id, :int,
913
+ :string, :pointer
914
+ end
915
+
916
+ # = Fields:
917
+ # :rbe_left ::
918
+ # (FFI::Pointer(*Cell))
919
+ # :rbe_right ::
920
+ # (FFI::Pointer(*Cell))
921
+ # :rbe_parent ::
922
+ # (FFI::Pointer(*Cell))
923
+ # :rbe_color ::
924
+ # (Integer)
925
+ class CellTreePointers < FFI::Struct
926
+ layout :rbe_left, :pointer,
927
+ :rbe_right, :pointer,
928
+ :rbe_parent, :pointer,
929
+ :rbe_color, :int
930
+ end
931
+
932
+ # = Fields:
933
+ # :row_num ::
934
+ # (Integer)
935
+ # :col_num ::
936
+ # (Integer)
937
+ # :type ::
938
+ # (Symbol from _enum_cell_types_)
939
+ # :format ::
940
+ # (Format)
941
+ # :u ::
942
+ # (CellU)
943
+ # :formula_result ::
944
+ # (Float)
945
+ # :user_data1 ::
946
+ # (String)
947
+ # :user_data2 ::
948
+ # (String)
949
+ # :sst_string ::
950
+ # (String)
951
+ # :tree_pointers ::
952
+ # (CellTreePointers)
953
+ class Cell < FFI::Struct
954
+ layout :row_num, :uint32,
955
+ :col_num, :uint16,
956
+ :type, :cell_types,
957
+ :format, :pointer,
958
+ :u, CellU.by_value,
959
+ :formula_result, :double,
960
+ :user_data1, :pointer,
961
+ :user_data2, :pointer,
962
+ :sst_string, :pointer,
963
+ :tree_pointers, CellTreePointers.by_value
964
+ end
965
+
966
+ # @method worksheet_write_number(worksheet, row, col, number, format)
967
+ # @param [Worksheet] worksheet
968
+ # @param [Integer] row
969
+ # @param [Integer] col
970
+ # @param [Float] number
971
+ # @param [Format] format
972
+ # @return [Symbol from _enum_error_]
973
+ # @scope class
974
+ attach_function :worksheet_write_number, :worksheet_write_number, [Worksheet, :uint32, :ushort, :double, Format], :error
975
+
976
+ # @method worksheet_write_string(worksheet, row, col, string, format)
977
+ # @param [Worksheet] worksheet
978
+ # @param [Integer] row
979
+ # @param [Integer] col
980
+ # @param [String] string
981
+ # @param [Format] format
982
+ # @return [Symbol from _enum_error_]
983
+ # @scope class
984
+ attach_function :worksheet_write_string, :worksheet_write_string, [Worksheet, :uint32, :ushort, :string, Format], :error
985
+
986
+ # @method worksheet_write_formula(worksheet, row, col, formula, format)
987
+ # @param [Worksheet] worksheet
988
+ # @param [Integer] row
989
+ # @param [Integer] col
990
+ # @param [String] formula
991
+ # @param [Format] format
992
+ # @return [Symbol from _enum_error_]
993
+ # @scope class
994
+ attach_function :worksheet_write_formula, :worksheet_write_formula, [Worksheet, :uint32, :ushort, :string, Format], :error
995
+
996
+ # @method worksheet_write_array_formula(worksheet, first_row, first_col, last_row, last_col, formula, format)
997
+ # @param [Worksheet] worksheet
998
+ # @param [Integer] first_row
999
+ # @param [Integer] first_col
1000
+ # @param [Integer] last_row
1001
+ # @param [Integer] last_col
1002
+ # @param [String] formula
1003
+ # @param [Format] format
1004
+ # @return [Symbol from _enum_error_]
1005
+ # @scope class
1006
+ attach_function :worksheet_write_array_formula, :worksheet_write_array_formula, [Worksheet, :uint32, :ushort, :uint, :ushort, :string, Format], :error
1007
+
1008
+ # @method worksheet_write_array_formula_num(worksheet, first_row, first_col, last_row, last_col, formula, format, result)
1009
+ # @param [Worksheet] worksheet
1010
+ # @param [Integer] first_row
1011
+ # @param [Integer] first_col
1012
+ # @param [Integer] last_row
1013
+ # @param [Integer] last_col
1014
+ # @param [String] formula
1015
+ # @param [Format] format
1016
+ # @param [Float] result
1017
+ # @return [Symbol from _enum_error_]
1018
+ # @scope class
1019
+ attach_function :worksheet_write_array_formula_num, :worksheet_write_array_formula_num, [Worksheet, :uint32, :ushort, :uint, :ushort, :string, Format, :double], :error
1020
+
1021
+ # @method worksheet_write_datetime(worksheet, row, col, datetime, format)
1022
+ # @param [Worksheet] worksheet
1023
+ # @param [Integer] row
1024
+ # @param [Integer] col
1025
+ # @param [Datetime] datetime
1026
+ # @param [Format] format
1027
+ # @return [Symbol from _enum_error_]
1028
+ # @scope class
1029
+ attach_function :worksheet_write_datetime, :worksheet_write_datetime, [Worksheet, :uint32, :ushort, Datetime, Format], :error
1030
+
1031
+ # @method worksheet_write_url_opt(worksheet, row_num, col_num, url, format, string, tooltip)
1032
+ # @param [Worksheet] worksheet
1033
+ # @param [Integer] row_num
1034
+ # @param [Integer] col_num
1035
+ # @param [String] url
1036
+ # @param [Format] format
1037
+ # @param [String] string
1038
+ # @param [String] tooltip
1039
+ # @return [Symbol from _enum_error_]
1040
+ # @scope class
1041
+ attach_function :worksheet_write_url_opt, :worksheet_write_url_opt, [Worksheet, :uint32, :ushort, :string, Format, :string, :string], :error
1042
+
1043
+ # @method worksheet_write_url(worksheet, row, col, url, format)
1044
+ # @param [Worksheet] worksheet
1045
+ # @param [Integer] row
1046
+ # @param [Integer] col
1047
+ # @param [String] url
1048
+ # @param [Format] format
1049
+ # @return [Symbol from _enum_error_]
1050
+ # @scope class
1051
+ attach_function :worksheet_write_url, :worksheet_write_url, [Worksheet, :uint32, :ushort, :string, Format], :error
1052
+
1053
+ # @method worksheet_write_boolean(worksheet, row, col, value, format)
1054
+ # @param [Worksheet] worksheet
1055
+ # @param [Integer] row
1056
+ # @param [Integer] col
1057
+ # @param [Integer] value
1058
+ # @param [Format] format
1059
+ # @return [Symbol from _enum_error_]
1060
+ # @scope class
1061
+ attach_function :worksheet_write_boolean, :worksheet_write_boolean, [Worksheet, :uint32, :ushort, :int, Format], :error
1062
+
1063
+ # @method worksheet_write_blank(worksheet, row, col, format)
1064
+ # @param [Worksheet] worksheet
1065
+ # @param [Integer] row
1066
+ # @param [Integer] col
1067
+ # @param [Format] format
1068
+ # @return [Symbol from _enum_error_]
1069
+ # @scope class
1070
+ attach_function :worksheet_write_blank, :worksheet_write_blank, [Worksheet, :uint32, :ushort, Format], :error
1071
+
1072
+ # @method worksheet_write_formula_num(worksheet, row, col, formula, format, result)
1073
+ # @param [Worksheet] worksheet
1074
+ # @param [Integer] row
1075
+ # @param [Integer] col
1076
+ # @param [String] formula
1077
+ # @param [Format] format
1078
+ # @param [Float] result
1079
+ # @return [Symbol from _enum_error_]
1080
+ # @scope class
1081
+ attach_function :worksheet_write_formula_num, :worksheet_write_formula_num, [Worksheet, :uint32, :ushort, :string, Format, :double], :error
1082
+
1083
+ # @method worksheet_set_row(worksheet, row, height, format)
1084
+ # @param [Worksheet] worksheet
1085
+ # @param [Integer] row
1086
+ # @param [Float] height
1087
+ # @param [Format] format
1088
+ # @return [Symbol from _enum_error_]
1089
+ # @scope class
1090
+ attach_function :worksheet_set_row, :worksheet_set_row, [Worksheet, :uint32, :double, Format], :error
1091
+
1092
+ # @method worksheet_set_row_opt(worksheet, row, height, format, options)
1093
+ # @param [Worksheet] worksheet
1094
+ # @param [Integer] row
1095
+ # @param [Float] height
1096
+ # @param [Format] format
1097
+ # @param [RowColOptions] options
1098
+ # @return [Symbol from _enum_error_]
1099
+ # @scope class
1100
+ attach_function :worksheet_set_row_opt, :worksheet_set_row_opt, [Worksheet, :uint32, :double, Format, RowColOptions], :error
1101
+
1102
+ # @method worksheet_set_column(worksheet, first_col, last_col, width, format)
1103
+ # @param [Worksheet] worksheet
1104
+ # @param [Integer] first_col
1105
+ # @param [Integer] last_col
1106
+ # @param [Float] width
1107
+ # @param [Format] format
1108
+ # @return [Symbol from _enum_error_]
1109
+ # @scope class
1110
+ attach_function :worksheet_set_column, :worksheet_set_column, [Worksheet, :ushort, :ushort, :double, Format], :error
1111
+
1112
+ # @method worksheet_set_column_opt(worksheet, first_col, last_col, width, format, options)
1113
+ # @param [Worksheet] worksheet
1114
+ # @param [Integer] first_col
1115
+ # @param [Integer] last_col
1116
+ # @param [Float] width
1117
+ # @param [Format] format
1118
+ # @param [RowColOptions] options
1119
+ # @return [Symbol from _enum_error_]
1120
+ # @scope class
1121
+ attach_function :worksheet_set_column_opt, :worksheet_set_column_opt, [Worksheet, :ushort, :ushort, :double, Format, RowColOptions], :error
1122
+
1123
+ # @method worksheet_insert_image(worksheet, row, col, filename)
1124
+ # @param [Worksheet] worksheet
1125
+ # @param [Integer] row
1126
+ # @param [Integer] col
1127
+ # @param [String] filename
1128
+ # @return [Symbol from _enum_error_]
1129
+ # @scope class
1130
+ attach_function :worksheet_insert_image, :worksheet_insert_image, [Worksheet, :uint32, :ushort, :string], :error
1131
+
1132
+ # @method worksheet_insert_image_opt(worksheet, row, col, filename, options)
1133
+ # @param [Worksheet] worksheet
1134
+ # @param [Integer] row
1135
+ # @param [Integer] col
1136
+ # @param [String] filename
1137
+ # @param [ImageOptions] options
1138
+ # @return [Symbol from _enum_error_]
1139
+ # @scope class
1140
+ attach_function :worksheet_insert_image_opt, :worksheet_insert_image_opt, [Worksheet, :uint32, :ushort, :string, ImageOptions], :error
1141
+
1142
+ # @method worksheet_insert_chart(worksheet, row, col, chart)
1143
+ # @param [Worksheet] worksheet
1144
+ # @param [Integer] row
1145
+ # @param [Integer] col
1146
+ # @param [Chart] chart
1147
+ # @return [Symbol from _enum_error_]
1148
+ # @scope class
1149
+ attach_function :worksheet_insert_chart, :worksheet_insert_chart, [Worksheet, :uint32, :ushort, Chart], :error
1150
+
1151
+ # @method worksheet_insert_chart_opt(worksheet, row, col, chart, user_options)
1152
+ # @param [Worksheet] worksheet
1153
+ # @param [Integer] row
1154
+ # @param [Integer] col
1155
+ # @param [Chart] chart
1156
+ # @param [ImageOptions] user_options
1157
+ # @return [Symbol from _enum_error_]
1158
+ # @scope class
1159
+ attach_function :worksheet_insert_chart_opt, :worksheet_insert_chart_opt, [Worksheet, :uint32, :ushort, Chart, ImageOptions], :error
1160
+
1161
+ # @method worksheet_merge_range(worksheet, first_row, first_col, last_row, last_col, string, format)
1162
+ # @param [Worksheet] worksheet
1163
+ # @param [Integer] first_row
1164
+ # @param [Integer] first_col
1165
+ # @param [Integer] last_row
1166
+ # @param [Integer] last_col
1167
+ # @param [String] string
1168
+ # @param [Format] format
1169
+ # @return [Symbol from _enum_error_]
1170
+ # @scope class
1171
+ attach_function :worksheet_merge_range, :worksheet_merge_range, [Worksheet, :uint32, :ushort, :uint32, :ushort, :string, Format], :error
1172
+
1173
+ # @method worksheet_autofilter(worksheet, first_row, first_col, last_row, last_col)
1174
+ # @param [Worksheet] worksheet
1175
+ # @param [Integer] first_row
1176
+ # @param [Integer] first_col
1177
+ # @param [Integer] last_row
1178
+ # @param [Integer] last_col
1179
+ # @return [Symbol from _enum_error_]
1180
+ # @scope class
1181
+ attach_function :worksheet_autofilter, :worksheet_autofilter, [Worksheet, :uint, :ushort, :uint, :ushort], :error
1182
+
1183
+ # @method worksheet_activate(worksheet)
1184
+ # @param [Worksheet] worksheet
1185
+ # @return [nil]
1186
+ # @scope class
1187
+ attach_function :worksheet_activate, :worksheet_activate, [Worksheet], :void
1188
+
1189
+ # @method worksheet_select(worksheet)
1190
+ # @param [Worksheet] worksheet
1191
+ # @return [nil]
1192
+ # @scope class
1193
+ attach_function :worksheet_select, :worksheet_select, [Worksheet], :void
1194
+
1195
+ # @method worksheet_hide(worksheet)
1196
+ # @param [Worksheet] worksheet
1197
+ # @return [nil]
1198
+ # @scope class
1199
+ attach_function :worksheet_hide, :worksheet_hide, [Worksheet], :void
1200
+
1201
+ # @method worksheet_set_first_sheet(worksheet)
1202
+ # @param [Worksheet] worksheet
1203
+ # @return [nil]
1204
+ # @scope class
1205
+ attach_function :worksheet_set_first_sheet, :worksheet_set_first_sheet, [Worksheet], :void
1206
+
1207
+ # @method worksheet_freeze_panes(worksheet, row, col)
1208
+ # @param [Worksheet] worksheet
1209
+ # @param [Integer] row
1210
+ # @param [Integer] col
1211
+ # @return [nil]
1212
+ # @scope class
1213
+ attach_function :worksheet_freeze_panes, :worksheet_freeze_panes, [Worksheet, :uint, :ushort], :void
1214
+
1215
+ # @method worksheet_split_panes(worksheet, vertical, horizontal)
1216
+ # @param [Worksheet] worksheet
1217
+ # @param [Float] vertical
1218
+ # @param [Float] horizontal
1219
+ # @return [nil]
1220
+ # @scope class
1221
+ attach_function :worksheet_split_panes, :worksheet_split_panes, [Worksheet, :double, :double], :void
1222
+
1223
+ # @method worksheet_freeze_panes_opt(worksheet, first_row, first_col, top_row, left_col, type)
1224
+ # @param [Worksheet] worksheet
1225
+ # @param [Integer] first_row
1226
+ # @param [Integer] first_col
1227
+ # @param [Integer] top_row
1228
+ # @param [Integer] left_col
1229
+ # @param [Integer] type
1230
+ # @return [nil]
1231
+ # @scope class
1232
+ attach_function :worksheet_freeze_panes_opt, :worksheet_freeze_panes_opt, [Worksheet, :uint, :ushort, :uint, :ushort, :uchar], :void
1233
+
1234
+ # @method worksheet_split_panes_opt(worksheet, vertical, horizontal, top_row, left_col)
1235
+ # @param [Worksheet] worksheet
1236
+ # @param [Float] vertical
1237
+ # @param [Float] horizontal
1238
+ # @param [Integer] top_row
1239
+ # @param [Integer] left_col
1240
+ # @return [nil]
1241
+ # @scope class
1242
+ attach_function :worksheet_split_panes_opt, :worksheet_split_panes_opt, [Worksheet, :double, :double, :uint, :ushort], :void
1243
+
1244
+ # @method worksheet_set_selection(worksheet, first_row, first_col, last_row, last_col)
1245
+ # @param [Worksheet] worksheet
1246
+ # @param [Integer] first_row
1247
+ # @param [Integer] first_col
1248
+ # @param [Integer] last_row
1249
+ # @param [Integer] last_col
1250
+ # @return [nil]
1251
+ # @scope class
1252
+ attach_function :worksheet_set_selection, :worksheet_set_selection, [Worksheet, :uint, :ushort, :uint, :ushort], :void
1253
+
1254
+ # @method worksheet_set_landscape(worksheet)
1255
+ # @param [Worksheet] worksheet
1256
+ # @return [nil]
1257
+ # @scope class
1258
+ attach_function :worksheet_set_landscape, :worksheet_set_landscape, [Worksheet], :void
1259
+
1260
+ # @method worksheet_set_portrait(worksheet)
1261
+ # @param [Worksheet] worksheet
1262
+ # @return [nil]
1263
+ # @scope class
1264
+ attach_function :worksheet_set_portrait, :worksheet_set_portrait, [Worksheet], :void
1265
+
1266
+ # @method worksheet_set_page_view(worksheet)
1267
+ # @param [Worksheet] worksheet
1268
+ # @return [nil]
1269
+ # @scope class
1270
+ attach_function :worksheet_set_page_view, :worksheet_set_page_view, [Worksheet], :void
1271
+
1272
+ # @method worksheet_set_paper(worksheet, paper_type)
1273
+ # @param [Worksheet] worksheet
1274
+ # @param [Integer] paper_type
1275
+ # @return [nil]
1276
+ # @scope class
1277
+ attach_function :worksheet_set_paper, :worksheet_set_paper, [Worksheet, :uchar], :void
1278
+
1279
+ # @method worksheet_set_margins(worksheet, left, right, top, bottom)
1280
+ # @param [Worksheet] worksheet
1281
+ # @param [Float] left
1282
+ # @param [Float] right
1283
+ # @param [Float] top
1284
+ # @param [Float] bottom
1285
+ # @return [nil]
1286
+ # @scope class
1287
+ attach_function :worksheet_set_margins, :worksheet_set_margins, [Worksheet, :double, :double, :double, :double], :void
1288
+
1289
+ # @method worksheet_set_header(worksheet, string)
1290
+ # @param [Worksheet] worksheet
1291
+ # @param [String] string
1292
+ # @return [Symbol from _enum_error_]
1293
+ # @scope class
1294
+ attach_function :worksheet_set_header, :worksheet_set_header, [Worksheet, :string], :error
1295
+
1296
+ # @method worksheet_set_footer(worksheet, string)
1297
+ # @param [Worksheet] worksheet
1298
+ # @param [String] string
1299
+ # @return [Symbol from _enum_error_]
1300
+ # @scope class
1301
+ attach_function :worksheet_set_footer, :worksheet_set_footer, [Worksheet, :string], :error
1302
+
1303
+ # @method worksheet_set_header_opt(worksheet, string, options)
1304
+ # @param [Worksheet] worksheet
1305
+ # @param [String] string
1306
+ # @param [HeaderFooterOptions] options
1307
+ # @return [Symbol from _enum_error_]
1308
+ # @scope class
1309
+ attach_function :worksheet_set_header_opt, :worksheet_set_header_opt, [Worksheet, :string, HeaderFooterOptions], :error
1310
+
1311
+ # @method worksheet_set_footer_opt(worksheet, string, options)
1312
+ # @param [Worksheet] worksheet
1313
+ # @param [String] string
1314
+ # @param [HeaderFooterOptions] options
1315
+ # @return [Symbol from _enum_error_]
1316
+ # @scope class
1317
+ attach_function :worksheet_set_footer_opt, :worksheet_set_footer_opt, [Worksheet, :string, HeaderFooterOptions], :error
1318
+
1319
+ # @method worksheet_set_h_pagebreaks(worksheet, breaks)
1320
+ # @param [Worksheet] worksheet
1321
+ # @param [FFI::Pointer(*U_int)] breaks
1322
+ # @return [Symbol from _enum_error_]
1323
+ # @scope class
1324
+ attach_function :worksheet_set_h_pagebreaks, :worksheet_set_h_pagebreaks, [Worksheet, :pointer], :error
1325
+
1326
+ # @method worksheet_set_v_pagebreaks(worksheet, breaks)
1327
+ # @param [Worksheet] worksheet
1328
+ # @param [FFI::Pointer(*U_short)] breaks
1329
+ # @return [Symbol from _enum_error_]
1330
+ # @scope class
1331
+ attach_function :worksheet_set_v_pagebreaks, :worksheet_set_v_pagebreaks, [Worksheet, :pointer], :error
1332
+
1333
+ # @method worksheet_print_across(worksheet)
1334
+ # @param [Worksheet] worksheet
1335
+ # @return [nil]
1336
+ # @scope class
1337
+ attach_function :worksheet_print_across, :worksheet_print_across, [Worksheet], :void
1338
+
1339
+ # @method worksheet_set_zoom(worksheet, scale)
1340
+ # @param [Worksheet] worksheet
1341
+ # @param [Integer] scale
1342
+ # @return [nil]
1343
+ # @scope class
1344
+ attach_function :worksheet_set_zoom, :worksheet_set_zoom, [Worksheet, :ushort], :void
1345
+
1346
+ # @method worksheet_gridlines(worksheet, option)
1347
+ # @param [Worksheet] worksheet
1348
+ # @param [Integer] option
1349
+ # @return [nil]
1350
+ # @scope class
1351
+ attach_function :worksheet_gridlines, :worksheet_gridlines, [Worksheet, :uchar], :void
1352
+
1353
+ # @method worksheet_center_horizontally(worksheet)
1354
+ # @param [Worksheet] worksheet
1355
+ # @return [nil]
1356
+ # @scope class
1357
+ attach_function :worksheet_center_horizontally, :worksheet_center_horizontally, [Worksheet], :void
1358
+
1359
+ # @method worksheet_center_vertically(worksheet)
1360
+ # @param [Worksheet] worksheet
1361
+ # @return [nil]
1362
+ # @scope class
1363
+ attach_function :worksheet_center_vertically, :worksheet_center_vertically, [Worksheet], :void
1364
+
1365
+ # @method worksheet_print_row_col_headers(worksheet)
1366
+ # @param [Worksheet] worksheet
1367
+ # @return [nil]
1368
+ # @scope class
1369
+ attach_function :worksheet_print_row_col_headers, :worksheet_print_row_col_headers, [Worksheet], :void
1370
+
1371
+ # @method worksheet_repeat_rows(worksheet, first_row, last_row)
1372
+ # @param [Worksheet] worksheet
1373
+ # @param [Integer] first_row
1374
+ # @param [Integer] last_row
1375
+ # @return [Symbol from _enum_error_]
1376
+ # @scope class
1377
+ attach_function :worksheet_repeat_rows, :worksheet_repeat_rows, [Worksheet, :uint, :uint], :error
1378
+
1379
+ # @method worksheet_repeat_columns(worksheet, first_col, last_col)
1380
+ # @param [Worksheet] worksheet
1381
+ # @param [Integer] first_col
1382
+ # @param [Integer] last_col
1383
+ # @return [Symbol from _enum_error_]
1384
+ # @scope class
1385
+ attach_function :worksheet_repeat_columns, :worksheet_repeat_columns, [Worksheet, :ushort, :ushort], :error
1386
+
1387
+ # @method worksheet_print_area(worksheet, first_row, first_col, last_row, last_col)
1388
+ # @param [Worksheet] worksheet
1389
+ # @param [Integer] first_row
1390
+ # @param [Integer] first_col
1391
+ # @param [Integer] last_row
1392
+ # @param [Integer] last_col
1393
+ # @return [Symbol from _enum_error_]
1394
+ # @scope class
1395
+ attach_function :worksheet_print_area, :worksheet_print_area, [Worksheet, :uint, :ushort, :uint, :ushort], :error
1396
+
1397
+ # @method worksheet_fit_to_pages(worksheet, width, height)
1398
+ # @param [Worksheet] worksheet
1399
+ # @param [Integer] width
1400
+ # @param [Integer] height
1401
+ # @return [nil]
1402
+ # @scope class
1403
+ attach_function :worksheet_fit_to_pages, :worksheet_fit_to_pages, [Worksheet, :ushort, :ushort], :void
1404
+
1405
+ # @method worksheet_set_start_page(worksheet, start_page)
1406
+ # @param [Worksheet] worksheet
1407
+ # @param [Integer] start_page
1408
+ # @return [nil]
1409
+ # @scope class
1410
+ attach_function :worksheet_set_start_page, :worksheet_set_start_page, [Worksheet, :ushort], :void
1411
+
1412
+ # @method worksheet_set_print_scale(worksheet, scale)
1413
+ # @param [Worksheet] worksheet
1414
+ # @param [Integer] scale
1415
+ # @return [nil]
1416
+ # @scope class
1417
+ attach_function :worksheet_set_print_scale, :worksheet_set_print_scale, [Worksheet, :ushort], :void
1418
+
1419
+ # @method worksheet_right_to_left(worksheet)
1420
+ # @param [Worksheet] worksheet
1421
+ # @return [nil]
1422
+ # @scope class
1423
+ attach_function :worksheet_right_to_left, :worksheet_right_to_left, [Worksheet], :void
1424
+
1425
+ # @method worksheet_hide_zero(worksheet)
1426
+ # @param [Worksheet] worksheet
1427
+ # @return [nil]
1428
+ # @scope class
1429
+ attach_function :worksheet_hide_zero, :worksheet_hide_zero, [Worksheet], :void
1430
+
1431
+ # @method worksheet_set_tab_color(worksheet, color)
1432
+ # @param [Worksheet] worksheet
1433
+ # @param [Integer] color
1434
+ # @return [nil]
1435
+ # @scope class
1436
+ attach_function :worksheet_set_tab_color, :worksheet_set_tab_color, [Worksheet, :int], :void
1437
+
1438
+ # @method worksheet_protect(worksheet, password, options)
1439
+ # @param [Worksheet] worksheet
1440
+ # @param [String] password
1441
+ # @param [Protection] options
1442
+ # @return [nil]
1443
+ # @scope class
1444
+ attach_function :worksheet_protect, :worksheet_protect, [Worksheet, :string, Protection], :void
1445
+
1446
+ # @method worksheet_set_default_row(worksheet, height, hide_unused_rows)
1447
+ # @param [Worksheet] worksheet
1448
+ # @param [Float] height
1449
+ # @param [Integer] hide_unused_rows
1450
+ # @return [nil]
1451
+ # @scope class
1452
+ attach_function :worksheet_set_default_row, :worksheet_set_default_row, [Worksheet, :double, :uchar], :void
1453
+
1454
+ # @method worksheet_new(init_data)
1455
+ # @param [WorksheetInitData] init_data
1456
+ # @return [Worksheet]
1457
+ # @scope class
1458
+ attach_function :worksheet_new, :lxw_worksheet_new, [WorksheetInitData], Worksheet
1459
+
1460
+ # @method worksheet_free(worksheet)
1461
+ # @param [Worksheet] worksheet
1462
+ # @return [nil]
1463
+ # @scope class
1464
+ attach_function :worksheet_free, :lxw_worksheet_free, [Worksheet], :void
1465
+
1466
+ # @method worksheet_assemble_xml_file(worksheet)
1467
+ # @param [Worksheet] worksheet
1468
+ # @return [nil]
1469
+ # @scope class
1470
+ attach_function :worksheet_assemble_xml_file, :lxw_worksheet_assemble_xml_file, [Worksheet], :void
1471
+
1472
+ # @method worksheet_write_single_row(worksheet)
1473
+ # @param [Worksheet] worksheet
1474
+ # @return [nil]
1475
+ # @scope class
1476
+ attach_function :worksheet_write_single_row, :lxw_worksheet_write_single_row, [Worksheet], :void
1477
+
1478
+ # @method worksheet_prepare_image(worksheet, image_ref_id, drawing_id, image_data)
1479
+ # @param [Worksheet] worksheet
1480
+ # @param [Integer] image_ref_id
1481
+ # @param [Integer] drawing_id
1482
+ # @param [ImageOptions] image_data
1483
+ # @return [nil]
1484
+ # @scope class
1485
+ attach_function :worksheet_prepare_image, :lxw_worksheet_prepare_image, [Worksheet, :ushort, :ushort, ImageOptions], :void
1486
+
1487
+ # @method worksheet_prepare_chart(worksheet, chart_ref_id, drawing_id, image_data)
1488
+ # @param [Worksheet] worksheet
1489
+ # @param [Integer] chart_ref_id
1490
+ # @param [Integer] drawing_id
1491
+ # @param [ImageOptions] image_data
1492
+ # @return [nil]
1493
+ # @scope class
1494
+ attach_function :worksheet_prepare_chart, :lxw_worksheet_prepare_chart, [Worksheet, :ushort, :ushort, ImageOptions], :void
1495
+
1496
+ # @method worksheet_find_row(worksheet, row_num)
1497
+ # @param [Worksheet] worksheet
1498
+ # @param [Integer] row_num
1499
+ # @return [Row]
1500
+ # @scope class
1501
+ attach_function :worksheet_find_row, :lxw_worksheet_find_row, [Worksheet, :uint32], Row
1502
+
1503
+ # @method worksheet_find_cell(row, col_num)
1504
+ # @param [Row] row
1505
+ # @param [Integer] col_num
1506
+ # @return [Cell]
1507
+ # @scope class
1508
+ attach_function :worksheet_find_cell, :lxw_worksheet_find_cell, [Row, :ushort], Cell
1509
+
1510
+ # = Fields:
1511
+ # :rbe_left ::
1512
+ # (FFI::Pointer(*WorksheetName))
1513
+ # :rbe_right ::
1514
+ # (FFI::Pointer(*WorksheetName))
1515
+ # :rbe_parent ::
1516
+ # (FFI::Pointer(*WorksheetName))
1517
+ # :rbe_color ::
1518
+ # (Integer)
1519
+ class WorksheetNameTreePointers < FFI::Struct
1520
+ layout :rbe_left, :pointer,
1521
+ :rbe_right, :pointer,
1522
+ :rbe_parent, :pointer,
1523
+ :rbe_color, :int
1524
+ end
1525
+
1526
+ # = Fields:
1527
+ # :name ::
1528
+ # (String)
1529
+ # :worksheet ::
1530
+ # (Worksheet)
1531
+ # :tree_pointers ::
1532
+ # (WorksheetNameTreePointers)
1533
+ class WorksheetName < FFI::Struct
1534
+ layout :name, :pointer,
1535
+ :worksheet, Worksheet,
1536
+ :tree_pointers, WorksheetNameTreePointers.by_value
1537
+ end
1538
+
1539
+ # = Fields:
1540
+ # :rbh_root ::
1541
+ # (FFI::Pointer(*WorksheetName))
1542
+ class WorksheetNames < FFI::Struct
1543
+ layout :rbh_root, WorksheetName
1544
+ end
1545
+
1546
+ # = Fields:
1547
+ # :stqh_first ::
1548
+ # (Worksheet)
1549
+ # :stqh_last ::
1550
+ # (FFI::Pointer(**Worksheet))
1551
+ class Worksheets < FFI::Struct
1552
+ layout :stqh_first, Worksheet.ptr,
1553
+ :stqh_last, :pointer
1554
+ end
1555
+ end