fast_excel 0.2.6 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/.dockerignore +2 -0
  3. data/.gitignore +3 -0
  4. data/.travis.yml +18 -6
  5. data/CHANGELOG.md +14 -1
  6. data/Dockerfile.test +16 -0
  7. data/Gemfile +1 -1
  8. data/Gemfile.lock +21 -21
  9. data/Makefile +13 -2
  10. data/README.md +148 -38
  11. data/Rakefile +2 -0
  12. data/examples/example.rb +3 -3
  13. data/examples/example_filters.rb +36 -0
  14. data/examples/example_formula.rb +1 -3
  15. data/examples/example_hyperlink.rb +20 -0
  16. data/fast_excel.gemspec +1 -1
  17. data/lib/fast_excel.rb +36 -12
  18. data/lib/fast_excel/binding.rb +31 -21
  19. data/lib/fast_excel/binding/chart.rb +20 -1
  20. data/lib/fast_excel/binding/workbook.rb +10 -2
  21. data/lib/fast_excel/binding/worksheet.rb +44 -27
  22. data/libxlsxwriter/.gitignore +1 -0
  23. data/libxlsxwriter/.indent.pro +5 -0
  24. data/libxlsxwriter/CMakeLists.txt +1 -11
  25. data/libxlsxwriter/CONTRIBUTING.md +1 -1
  26. data/libxlsxwriter/Changes.txt +84 -0
  27. data/libxlsxwriter/LICENSE.txt +1 -1
  28. data/libxlsxwriter/Makefile +7 -5
  29. data/libxlsxwriter/Readme.md +1 -1
  30. data/libxlsxwriter/cocoapods/libxlsxwriter-umbrella.h +1 -0
  31. data/libxlsxwriter/include/xlsxwriter.h +2 -2
  32. data/libxlsxwriter/include/xlsxwriter/app.h +2 -2
  33. data/libxlsxwriter/include/xlsxwriter/chart.h +56 -6
  34. data/libxlsxwriter/include/xlsxwriter/chartsheet.h +544 -0
  35. data/libxlsxwriter/include/xlsxwriter/common.h +27 -6
  36. data/libxlsxwriter/include/xlsxwriter/content_types.h +5 -2
  37. data/libxlsxwriter/include/xlsxwriter/core.h +2 -2
  38. data/libxlsxwriter/include/xlsxwriter/custom.h +2 -2
  39. data/libxlsxwriter/include/xlsxwriter/drawing.h +3 -2
  40. data/libxlsxwriter/include/xlsxwriter/format.h +3 -3
  41. data/libxlsxwriter/include/xlsxwriter/hash_table.h +1 -1
  42. data/libxlsxwriter/include/xlsxwriter/packager.h +13 -8
  43. data/libxlsxwriter/include/xlsxwriter/relationships.h +2 -2
  44. data/libxlsxwriter/include/xlsxwriter/shared_strings.h +5 -3
  45. data/libxlsxwriter/include/xlsxwriter/styles.h +9 -4
  46. data/libxlsxwriter/include/xlsxwriter/theme.h +2 -2
  47. data/libxlsxwriter/include/xlsxwriter/utility.h +26 -2
  48. data/libxlsxwriter/include/xlsxwriter/workbook.h +232 -55
  49. data/libxlsxwriter/include/xlsxwriter/worksheet.h +264 -53
  50. data/libxlsxwriter/include/xlsxwriter/xmlwriter.h +3 -1
  51. data/libxlsxwriter/libxlsxwriter.podspec +1 -1
  52. data/libxlsxwriter/src/Makefile +3 -3
  53. data/libxlsxwriter/src/app.c +2 -2
  54. data/libxlsxwriter/src/chart.c +41 -5
  55. data/libxlsxwriter/src/chartsheet.c +508 -0
  56. data/libxlsxwriter/src/content_types.c +12 -4
  57. data/libxlsxwriter/src/core.c +2 -2
  58. data/libxlsxwriter/src/custom.c +2 -2
  59. data/libxlsxwriter/src/drawing.c +114 -17
  60. data/libxlsxwriter/src/format.c +3 -3
  61. data/libxlsxwriter/src/hash_table.c +1 -1
  62. data/libxlsxwriter/src/packager.c +369 -65
  63. data/libxlsxwriter/src/relationships.c +2 -2
  64. data/libxlsxwriter/src/shared_strings.c +18 -4
  65. data/libxlsxwriter/src/styles.c +56 -9
  66. data/libxlsxwriter/src/theme.c +2 -2
  67. data/libxlsxwriter/src/utility.c +53 -6
  68. data/libxlsxwriter/src/workbook.c +372 -56
  69. data/libxlsxwriter/src/worksheet.c +425 -76
  70. data/libxlsxwriter/src/xmlwriter.c +17 -8
  71. data/libxlsxwriter/third_party/minizip/ioapi.c +10 -0
  72. data/libxlsxwriter/third_party/minizip/zip.c +2 -0
  73. data/libxlsxwriter/third_party/tmpfileplus/tmpfileplus.c +2 -2
  74. data/libxlsxwriter/version.txt +1 -1
  75. data/test/tmpfile_test.rb +1 -0
  76. data/test/validations_test.rb +26 -6
  77. data/test/worksheet_test.rb +43 -0
  78. metadata +9 -6
  79. data/libxlsxwriter/.drone.yml +0 -27
  80. data/libxlsxwriter/appveyor.yml +0 -65
  81. data/libxlsxwriter/cmake/FindZLIB.cmake +0 -123
data/Rakefile CHANGED
@@ -17,12 +17,14 @@ end
17
17
 
18
18
  #task :default => :test
19
19
 
20
+ desc "Run all examples"
20
21
  task :examples do
21
22
  Dir.glob('examples/**/*.rb').each do |file|
22
23
  require './' + file.sub(/\.rb$/, '')
23
24
  end
24
25
  end
25
26
 
27
+ desc "Compile libxlsxwriter shared library"
26
28
  task :compile do
27
29
  %x{
28
30
  cd ext/fast_excel
@@ -11,7 +11,7 @@ workbook.default_format.set(
11
11
 
12
12
  worksheet = workbook.add_worksheet("Payments Report")
13
13
 
14
- bold = workbook.bold_cell_format
14
+ bold = workbook.bold_format
15
15
  worksheet.set_column(0, 0, FastExcel::DEF_COL_WIDTH, bold)
16
16
 
17
17
  price = workbook.number_format("#,##0.00")
@@ -20,10 +20,10 @@ worksheet.set_column(1, 1, 20, price)
20
20
  date_format = workbook.number_format("[$-409]m/d/yy h:mm AM/PM;@")
21
21
  worksheet.set_column(2, 2, 20, date_format)
22
22
 
23
- worksheet.write_row(0, ["message", "price", "date"], bold)
23
+ worksheet.write_row(0, ["message", "price", "date", "complete"], bold)
24
24
 
25
25
  for i in 1..1000
26
- worksheet.write_row(i, ["Hello", (rand * 10_000_000).round(2), Time.now])
26
+ worksheet.write_row(i, ["Hello", (rand * 10_000_000).round(2), Time.now, i % 2 == 0])
27
27
 
28
28
  # Or manually
29
29
  # worksheet.write_string(i, 0, "Hello", nil)
@@ -0,0 +1,36 @@
1
+ require_relative '../lib/fast_excel'
2
+
3
+ `rm example_filters.xlsx` if File.exist?('example_filters.xlsx')
4
+ workbook = FastExcel.open("example_filters.xlsx", constant_memory: false)
5
+
6
+ workbook.default_format.set(
7
+ font_size: 0, # user's default
8
+ #font_family: "Arial"
9
+ )
10
+
11
+ # pp workbook.default_format
12
+
13
+ worksheet = workbook.add_worksheet("Payments Report")
14
+
15
+ p worksheet[:filter_on]
16
+ FastExcel.print_ffi_obj(worksheet)
17
+
18
+ bold = workbook.bold_format
19
+ worksheet.set_column(0, 0, FastExcel::DEF_COL_WIDTH, bold)
20
+
21
+ price = workbook.number_format("#,##0.00")
22
+ worksheet.set_column(1, 1, 20, price)
23
+
24
+ date_format = workbook.number_format("[$-409]m/d/yy h:mm AM/PM;@")
25
+ worksheet.set_column(2, 2, 20, date_format)
26
+
27
+ worksheet.write_row(0, ["message", "price", "date", "complete"], bold)
28
+
29
+ for i in 1..1000
30
+ worksheet.write_row(i, ["Hello", (rand * 10_000_000).round(2), Time.now, i % 2 == 0])
31
+ end
32
+
33
+ worksheet.enable_filters!(end_col: 3)
34
+
35
+ workbook.close
36
+ puts "Saved to file example_filters.xlsx"
@@ -10,9 +10,7 @@ worksheet.write_row(2, ["Phone", 0.138])
10
10
  worksheet.write_row(3, ["Mouse", 0.099])
11
11
  worksheet.write_row(4, ["Speaker", 2.5])
12
12
  worksheet.write_row(5, ["Camera", 0.383])
13
- worksheet.write_row(6, ["Total", FastExcel::Formula.new("SUM(B2:B6)")], workbook.bold_cell_format)
14
-
15
- bold = workbook.bold_cell_format
13
+ worksheet.write_row(6, ["Total", FastExcel::Formula.new("SUM(B2:B6)")], workbook.bold_format)
16
14
 
17
15
  workbook.close
18
16
  puts "Saved to file example_formula.xlsx"
@@ -0,0 +1,20 @@
1
+ require_relative '../lib/fast_excel'
2
+
3
+ workbook = FastExcel.open("example_hyperlink.xlsx", constant_memory: false)
4
+ worksheet = workbook.add_worksheet
5
+ worksheet.auto_width = true
6
+
7
+ url_format = workbook.add_format(underline: :underline_single, font_color: :blue)
8
+
9
+ worksheet.append_row([
10
+ "Ultra Fast Excel Writer for Ruby",
11
+ FastExcel::URL.new("https://github.com/Paxa/fast_excel"),
12
+ FastExcel::URL.new("postgres://localhost")
13
+ ], [nil, url_format])
14
+
15
+ # Same as:
16
+ # worksheet.write_value(0, 0, "Ultra Fast Excel Writer for Ruby")
17
+ # worksheet.write_url(0, 1, "https://github.com/Paxa/fast_excel", url_format)
18
+
19
+ workbook.close
20
+ puts "Saved to file example_hyperlink.xlsx"
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "fast_excel"
3
- s.version = "0.2.6"
3
+ s.version = "0.3.0"
4
4
  s.author = ["Pavel Evstigneev"]
5
5
  s.email = ["pavel.evst@gmail.com"]
6
6
  s.homepage = "https://github.com/paxa/fast_excel"
@@ -13,12 +13,19 @@ module FastExcel
13
13
  end
14
14
  end
15
15
 
16
+ class URL
17
+ attr_accessor :url
18
+ def initialize(url)
19
+ @url = url
20
+ end
21
+ end
22
+
16
23
  DEF_COL_WIDTH = 8.43
17
24
 
18
25
  def self.open(filename = nil, constant_memory: false, default_format: nil)
19
26
  tmp_file = false
20
27
  if filename
21
- if File.exist?(filename)
28
+ if File.exist?(filename) && File.size(filename) > 0
22
29
  raise ArgumentError, "File '#{filename}' already exists. FastExcel can not open existing files, only create new files"
23
30
  end
24
31
  else
@@ -298,7 +305,7 @@ module FastExcel
298
305
  if respond_to?("#{key}=")
299
306
  send("#{key}=", value)
300
307
  elsif respond_to?("set_#{key}=")
301
- send("set_#{key}=", value)
308
+ send("set_#{key}=", value)
302
309
  else
303
310
  self[key] = value
304
311
  end
@@ -344,6 +351,8 @@ module FastExcel
344
351
  bold
345
352
  end
346
353
 
354
+ alias_method :bold_format, :bold_cell_format
355
+
347
356
  # "#,##0.00"
348
357
  # "[$-409]m/d/yy h:mm AM/PM;@"
349
358
  def number_format(pattern)
@@ -353,16 +362,18 @@ module FastExcel
353
362
  end
354
363
 
355
364
  def add_worksheet(sheetname = nil)
356
- sheetname = nil if sheetname == ""
357
-
358
- if !sheetname.nil? && @sheet_names.include?(sheetname)
359
- raise ArgumentError, "Worksheet name '#{sheetname}' is already in use"
365
+ if !sheetname.nil?
366
+ if sheetname.length > Libxlsxwriter::SHEETNAME_MAX
367
+ raise ArgumentError, "Worksheet name '#{sheetname}' exceeds Excel's limit of #{Libxlsxwriter::SHEETNAME_MAX} characters"
368
+ elsif @sheet_names.include?(sheetname)
369
+ raise ArgumentError, "Worksheet name '#{sheetname}' is already in use"
370
+ end
360
371
  end
361
- @sheet_names << sheetname
362
372
 
363
- sheet = super
373
+ sheet = super(sheetname)
364
374
  sheet.workbook = self
365
375
  @sheets << sheet
376
+ @sheet_names << sheet[:name]
366
377
  sheet
367
378
  end
368
379
 
@@ -383,11 +394,11 @@ module FastExcel
383
394
  close if @is_open
384
395
  File.open(filename, 'rb', &:read)
385
396
  ensure
386
- remove_tmp_file
397
+ remove_tmp_folder
387
398
  end
388
399
 
389
- def remove_tmp_file
390
- File.delete(filename) if tmp_file
400
+ def remove_tmp_folder
401
+ FileUtils.remove_entry(File.dirname(filename)) if tmp_file
391
402
  end
392
403
 
393
404
  def constant_memory?
@@ -445,8 +456,13 @@ module FastExcel
445
456
  write_number(row_number, cell_number, FastExcel.date_num(value), format)
446
457
  elsif defined?(DateTime) && value.is_a?(DateTime)
447
458
  write_number(row_number, cell_number, FastExcel.date_num(value), format)
448
- elsif value.is_a?(Formula)
459
+ elsif value.is_a?(TrueClass) || value.is_a?(FalseClass)
460
+ write_boolean(row_number, cell_number, value ? 1 : 0, format)
461
+ elsif value.is_a?(FastExcel::Formula)
449
462
  write_formula(row_number, cell_number, value.fml, format)
463
+ elsif value.is_a?(FastExcel::URL)
464
+ write_url(row_number, cell_number, value.url, format)
465
+ add_text_width(value.url, format, cell_number) if auto_width?
450
466
  else
451
467
  write_string(row_number, cell_number, value.to_s, format)
452
468
  add_text_width(value, format, cell_number) if auto_width?
@@ -487,6 +503,10 @@ module FastExcel
487
503
  write_row(last_row_number, values, formats)
488
504
  end
489
505
 
506
+ def <<(values)
507
+ append_row(values)
508
+ end
509
+
490
510
  def last_row_number
491
511
  @last_row_number
492
512
  end
@@ -510,6 +530,10 @@ module FastExcel
510
530
  end
511
531
  end
512
532
 
533
+ def enable_filters!(start_col: 0, end_col:)
534
+ autofilter(start_col, 0, @last_row_number, end_col)
535
+ end
536
+
513
537
  def close
514
538
  if auto_width?
515
539
  @column_widths.each do |num, width|
@@ -119,6 +119,10 @@ module Libxlsxwriter
119
119
 
120
120
  SCHEMA_ROOT = "http://schemas.openxmlformats.org"
121
121
 
122
+
123
+ PORTRAIT = 1
124
+ LANDSCAPE = 0
125
+
122
126
  def error(message)
123
127
  fprintf(STDERR, "[ERROR][%s:%d]: \"message\"\n", FILE, LINE)
124
128
  end
@@ -317,24 +321,31 @@ module Libxlsxwriter
317
321
  :error_memory_malloc_failed, 1,
318
322
  :error_creating_xlsx_file, 2,
319
323
  :error_creating_tmpfile, 3,
320
- :error_zip_file_operation, 4,
321
- :error_zip_file_add, 5,
322
- :error_zip_close, 6,
323
- :error_null_parameter_ignored, 7,
324
- :error_parameter_validation, 8,
325
- :error_sheetname_length_exceeded, 9,
326
- :error_invalid_sheetname_character, 10,
327
- :error_sheetname_already_used, 11,
328
- :error_128_string_length_exceeded, 12,
329
- :error_255_string_length_exceeded, 13,
330
- :error_max_string_length_exceeded, 14,
331
- :error_shared_string_index_not_found, 15,
332
- :error_worksheet_index_out_of_range, 16,
333
- :error_worksheet_max_number_urls_exceeded, 17,
334
- :error_image_dimensions, 18,
335
- :max_errno, 19
324
+ :error_reading_tmpfile, 4,
325
+ :error_zip_file_operation, 5,
326
+ :error_zip_parameter_error, 6,
327
+ :error_zip_bad_zip_file, 7,
328
+ :error_zip_internal_error, 8,
329
+ :error_zip_file_add, 9,
330
+ :error_zip_close, 10,
331
+ :error_null_parameter_ignored, 11,
332
+ :error_parameter_validation, 12,
333
+ :error_sheetname_length_exceeded, 13,
334
+ :error_invalid_sheetname_character, 14,
335
+ :error_sheetname_start_end_apostrophe, 15,
336
+ :error_sheetname_already_used, 16,
337
+ :error_sheetname_reserved, 17,
338
+ :error_32_string_length_exceeded, 18,
339
+ :error_128_string_length_exceeded, 19,
340
+ :error_255_string_length_exceeded, 20,
341
+ :error_max_string_length_exceeded, 21,
342
+ :error_shared_string_index_not_found, 22,
343
+ :error_worksheet_index_out_of_range, 23,
344
+ :error_worksheet_max_number_urls_exceeded, 24,
345
+ :error_image_dimensions, 25,
346
+ :max_errno, 26
336
347
  ]
337
-
348
+
338
349
  # = Fields:
339
350
  # :year ::
340
351
  # (Integer) Year : 1900 - 9999
@@ -887,6 +898,7 @@ module Libxlsxwriter
887
898
  include DrawingWrappers
888
899
  layout :file, :pointer,
889
900
  :embedded, :uchar,
901
+ :orientation, :uchar,
890
902
  :drawing_objects, DrawingObjects
891
903
  end
892
904
 
@@ -2610,9 +2622,7 @@ module Libxlsxwriter
2610
2622
  :zipfile_info, ZipFileinfo.by_value,
2611
2623
  :filename, :string,
2612
2624
  :buffer, :string,
2613
- :tmpdir, :string,
2614
- :chart_count, :ushort,
2615
- :drawing_count, :ushort
2625
+ :tmpdir, :string
2616
2626
  end
2617
2627
 
2618
2628
  # @method packager_new(filename, tmpdir)
@@ -2620,7 +2630,7 @@ module Libxlsxwriter
2620
2630
  # @param [String] tmpdir
2621
2631
  # @return [Packager]
2622
2632
  # @scope class
2623
- attach_function :packager_new, :lxw_packager_new, [:string, :string], Packager
2633
+ attach_function :packager_new, :lxw_packager_new, [:string, :string, :uchar], Packager
2624
2634
 
2625
2635
  # @method packager_free(packager)
2626
2636
  # @param [Packager] packager
@@ -906,7 +906,23 @@ module Libxlsxwriter
906
906
  :end_, 0,
907
907
  :no, 1
908
908
  ]
909
-
909
+
910
+ enum :chart_error_bar_axis, [
911
+ :axis_x, 0,
912
+ :axis_y, 1
913
+ ]
914
+
915
+ enum :chart_axis_label_alignment, [
916
+ :align_center, 0,
917
+ :align_left, 1,
918
+ :align_right, 2
919
+ ]
920
+
921
+ enum :chart_axis_type, [
922
+ :axis_type_x, 0,
923
+ :axis_type_y, 1
924
+ ]
925
+
910
926
  # = Fields:
911
927
  # :type ::
912
928
  # (Integer)
@@ -1268,6 +1284,7 @@ module Libxlsxwriter
1268
1284
  :show_labels_legend, :uchar,
1269
1285
  :show_labels_percent, :uchar,
1270
1286
  :label_position, :uchar,
1287
+ :label_align, :uchar,
1271
1288
  :label_separator, :uchar,
1272
1289
  :default_label_position, :uchar,
1273
1290
  :label_num_format, :string,
@@ -1934,6 +1951,7 @@ module Libxlsxwriter
1934
1951
  :in_use, :uchar,
1935
1952
  :chart_group, :uchar,
1936
1953
  :cat_has_num_fmt, :uchar,
1954
+ :is_chartsheet, :uchar,
1937
1955
  :has_horiz_cat_axis, :uchar,
1938
1956
  :has_horiz_val_axis, :uchar,
1939
1957
  :style_id, :uchar,
@@ -1976,6 +1994,7 @@ module Libxlsxwriter
1976
1994
  :up_bar_fill, ChartFill,
1977
1995
  :down_bar_fill, ChartFill,
1978
1996
  :default_label_position, :uchar,
1997
+ :is_protected, :uchar,
1979
1998
  :ordered_list_pointers, ChartOrderedListPointers.by_value,
1980
1999
  :list_pointers, ChartListPointers.by_value
1981
2000
  end
@@ -6,7 +6,8 @@ module Libxlsxwriter
6
6
  # (String) Directory to use for the temporary files created by libxlsxwriter.
7
7
  class WorkbookOptions < FFI::Struct
8
8
  layout :constant_memory, :uchar,
9
- :tmpdir, :string
9
+ :tmpdir, :string,
10
+ :use_zip64, :uchar
10
11
  end
11
12
 
12
13
  # = Fields:
@@ -168,8 +169,11 @@ module Libxlsxwriter
168
169
  class Workbook < FFI::Struct
169
170
  include WorkbookWrappers
170
171
  layout :file, :pointer,
172
+ :sheets, Sheets.ptr,
171
173
  :worksheets, Worksheets.ptr,
174
+ :chartsheets, :pointer,
172
175
  :worksheet_names, WorksheetNames.ptr,
176
+ :chartsheet_names, :pointer,
173
177
  :charts, Charts.ptr,
174
178
  :ordered_charts, Charts.ptr,
175
179
  :formats, Formats.ptr,
@@ -180,6 +184,8 @@ module Libxlsxwriter
180
184
  :filename, :pointer,
181
185
  :options, WorkbookOptions.by_value,
182
186
  :num_sheets, :uint16,
187
+ :num_worksheets, :uint16,
188
+ :num_chartsheets, :uint16,
183
189
  :first_sheet, :uint16,
184
190
  :active_sheet, :uint16,
185
191
  :num_xf_formats, :uint16,
@@ -192,7 +198,9 @@ module Libxlsxwriter
192
198
  :has_png, :uchar,
193
199
  :has_jpeg, :uchar,
194
200
  :has_bmp, :uchar,
195
- :used_xf_formats, HashTable.ptr
201
+ :used_xf_formats, HashTable.ptr,
202
+ :vba_project, :pointer,
203
+ :vba_codename, :pointer
196
204
  end
197
205
 
198
206
  attach_function :workbook_default_format, :workbook_default_format, [Workbook], Format
@@ -593,7 +593,7 @@ module Libxlsxwriter
593
593
  end
594
594
 
595
595
  # @return [nil]
596
- def right_to_left()
596
+ def set_right_to_left()
597
597
  Libxlsxwriter.worksheet_right_to_left(self)
598
598
  end
599
599
 
@@ -689,6 +689,7 @@ module Libxlsxwriter
689
689
  :array, :pointer,
690
690
  :merged_ranges, MergedRanges.ptr,
691
691
  :selections, Selections.ptr,
692
+ :data_validations, :pointer, # TODO add real definition for lxw_data_validations
692
693
  :image_data, ImageData.ptr,
693
694
  :chart_data, ChartData.ptr,
694
695
  :dim_rowmin, :uint32,
@@ -705,6 +706,7 @@ module Libxlsxwriter
705
706
  :hidden, :uint8,
706
707
  :active_sheet, :pointer,
707
708
  :first_sheet, :pointer,
709
+ :is_chartsheet, :uint8,
708
710
  :col_options, :pointer,
709
711
  :col_options_max, :uint16,
710
712
  :col_sizes, :pointer,
@@ -724,25 +726,29 @@ module Libxlsxwriter
724
726
  :rel_count, :uint16,
725
727
  :vertical_dpi, :uint16,
726
728
  :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,
729
+ :filter_on, :uint8,
730
+ :fit_page, :uint8,
731
+ :hcenter, :uint8,
732
+ :orientation, :uint8,
733
+ :outline_changed, :uint8,
734
+ :outline_on, :uint8,
735
+ :outline_style, :uint8,
736
+ :outline_below, :uint8,
737
+ :outline_right, :uint8,
738
+ :page_order, :uint8,
739
+ :page_setup_changed, :uint8,
740
+ :page_view, :uint8,
741
+ :paper_size, :uint8,
742
+ :print_gridlines, :uint8,
743
+ :print_headers, :uint8,
739
744
  :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,
745
+ :right_to_left, :uint8,
746
+ :screen_gridlines, :uint8,
747
+ :show_zeros, :uint8,
748
+ :vcenter, :uint8,
749
+ :zoom_scale_normal, :uint8,
750
+ :num_validations, :uint8,
751
+ :vba_codename, :pointer,
746
752
  :tab_color, :int,
747
753
  :margin_left, :double,
748
754
  :margin_right, :double,
@@ -891,13 +897,14 @@ module Libxlsxwriter
891
897
  :number_cell, 1,
892
898
  :string_cell, 2,
893
899
  :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
900
+ :inline_rich_string_cell, 4,
901
+ :formula_cell, 5,
902
+ :array_formula_cell, 6,
903
+ :blank_cell, 7,
904
+ :boolean_cell, 8,
905
+ :hyperlink_url, 9,
906
+ :hyperlink_internal, 10,
907
+ :hyperlink_external, 11
901
908
  ]
902
909
 
903
910
  # = Fields:
@@ -1552,4 +1559,14 @@ module Libxlsxwriter
1552
1559
  layout :stqh_first, Worksheet.ptr,
1553
1560
  :stqh_last, :pointer
1554
1561
  end
1555
- end
1562
+
1563
+ class Sheet < FFI::Struct
1564
+ layout :is_chartsheet, :uchar,
1565
+ :list_pointers, :pointer
1566
+ end
1567
+
1568
+ class Sheets < FFI::Struct
1569
+ layout :stqh_first, Sheet.ptr,
1570
+ :stqh_last, :pointer
1571
+ end
1572
+ end