write_xlsx 0.60.0 → 0.61.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/README.rdoc +11 -1
  2. data/examples/hide_row_col.rb +33 -0
  3. data/html/en/doc_en.html +7765 -0
  4. data/html/index.html +16 -0
  5. data/html/style.css +433 -0
  6. data/lib/write_xlsx/chart.rb +20 -0
  7. data/lib/write_xlsx/package/button.rb +132 -0
  8. data/lib/write_xlsx/package/comments.rb +97 -1
  9. data/lib/write_xlsx/package/shared_strings.rb +2 -2
  10. data/lib/write_xlsx/package/vml.rb +9 -419
  11. data/lib/write_xlsx/utility.rb +138 -0
  12. data/lib/write_xlsx/version.rb +1 -1
  13. data/lib/write_xlsx/workbook.rb +2 -2
  14. data/lib/write_xlsx/worksheet.rb +178 -115
  15. data/test/drawing/test_write_row.rb +1 -1
  16. data/test/perl_output/hide_row_col.xlsx +0 -0
  17. data/test/perl_output/merge4.xlsx +0 -0
  18. data/test/perl_output/merge6.xlsx +0 -0
  19. data/test/regression/{test_vml04.rb → disabled_test_vml04.rb} +0 -0
  20. data/test/regression/test_chart_size01.rb +41 -0
  21. data/test/regression/test_chart_size02.rb +41 -0
  22. data/test/regression/test_chart_size03.rb +39 -0
  23. data/test/regression/test_default_row01.rb +26 -0
  24. data/test/regression/test_default_row02.rb +28 -0
  25. data/test/regression/test_default_row03.rb +28 -0
  26. data/test/regression/test_default_row04.rb +31 -0
  27. data/test/regression/xlsx_files/chart_size01.xlsx +0 -0
  28. data/test/regression/xlsx_files/default_row01.xlsx +0 -0
  29. data/test/regression/xlsx_files/default_row02.xlsx +0 -0
  30. data/test/regression/xlsx_files/default_row03.xlsx +0 -0
  31. data/test/regression/xlsx_files/default_row04.xlsx +0 -0
  32. data/test/test_example_match.rb +22 -0
  33. data/test/worksheet/test_write_methods.rb +0 -7
  34. metadata +35 -22
  35. data/test/package/vml/test_write_anchor.rb +0 -14
  36. data/test/package/vml/test_write_column.rb +0 -14
  37. data/test/package/vml/test_write_fill.rb +0 -22
  38. data/test/package/vml/test_write_move_with_cells.rb +0 -14
  39. data/test/package/vml/test_write_row.rb +0 -14
  40. data/test/package/vml/test_write_shadow.rb +0 -14
  41. data/test/package/vml/test_write_size_with_cells.rb +0 -14
  42. data/test/package/vml/test_write_textbox.rb +0 -14
  43. data/test/worksheet/test_write_hyperlinks.rb +0 -27
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = write_xlsx
2
2
 
3
- gem to create a new file in the Excel 2007+ XLSX format, and you can use the same interface as writeexcel gem. write_xlsx is converted from Perl's module Excel::Writer::XLSX-0.58, https://github.com/jmcnamara/excel-writer-xlsx .
3
+ gem to create a new file in the Excel 2007+ XLSX format, and you can use the same interface as writeexcel gem. write_xlsx is converted from Perl's module Excel::Writer::XLSX-0.60, https://github.com/jmcnamara/excel-writer-xlsx .
4
4
 
5
5
  == Description
6
6
 
@@ -15,6 +15,7 @@ The WriteXLSX supports the following features:
15
15
  * Autofilters
16
16
  * Data validation
17
17
  * Conditional formatting
18
+ * Macros
18
19
  * Tables
19
20
  * Shapes
20
21
  * Sparklines
@@ -74,6 +75,15 @@ the first worksheet in an Excel XML spreadsheet called ruby.xlsx:
74
75
  workbook.close
75
76
 
76
77
  == Recent change
78
+ 2013-02-23 v0.61.0
79
+ Allow a cell url string to be over written with a number or formula
80
+ using a second write() call to the same cell. The url remains intact.
81
+
82
+ Added Worksheet#set_default_row method to set worksheet default values
83
+ for rows.
84
+
85
+ Added Chart#size method to set the chart dimensions.
86
+
77
87
  2013-02-19 v0.60.0
78
88
  Added Excel form buttons via the worksheet insert_button() method.
79
89
  This allows the user to tie the button to an embedded macro imported
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env ruby
2
+ # -*- coding: utf-8 -*-
3
+
4
+ #######################################################################
5
+ #
6
+ # Example of how to hide rows and columns in Excel::Writer::XLSX. In order to
7
+ # hide rows without setting each one, (of approximately 1 million rows),
8
+ # Excel uses an optimisation to hide all rows that don't have data.
9
+ #
10
+ # reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
11
+ # convert to ruby by Hideo NAKAMURA, cxn03651@msj.biglobe.ne.jp
12
+ #
13
+
14
+ require 'rubygems'
15
+ require 'write_xlsx'
16
+
17
+ workbook = WriteXLSX.new('hide_row_col.xlsx')
18
+ worksheet = workbook.add_worksheet
19
+
20
+ # Write some data
21
+ worksheet.write('D1', 'Some hidden columns.')
22
+ worksheet.write('A8', 'Some hidden rows.')
23
+
24
+ # Hide all rows without data.
25
+ worksheet.set_default_row(nil, 1)
26
+
27
+ # Set emptys row that we do want to display. All other will be hidden.
28
+ (1..6).each { |row| worksheet.set_row(row, 15) }
29
+
30
+ # Hide a range of columns.
31
+ worksheet.set_column('G:XFD', nil, nil, 1)
32
+
33
+ workbook.close