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.
- data/README.rdoc +11 -1
- data/examples/hide_row_col.rb +33 -0
- data/html/en/doc_en.html +7765 -0
- data/html/index.html +16 -0
- data/html/style.css +433 -0
- data/lib/write_xlsx/chart.rb +20 -0
- data/lib/write_xlsx/package/button.rb +132 -0
- data/lib/write_xlsx/package/comments.rb +97 -1
- data/lib/write_xlsx/package/shared_strings.rb +2 -2
- data/lib/write_xlsx/package/vml.rb +9 -419
- data/lib/write_xlsx/utility.rb +138 -0
- data/lib/write_xlsx/version.rb +1 -1
- data/lib/write_xlsx/workbook.rb +2 -2
- data/lib/write_xlsx/worksheet.rb +178 -115
- data/test/drawing/test_write_row.rb +1 -1
- data/test/perl_output/hide_row_col.xlsx +0 -0
- data/test/perl_output/merge4.xlsx +0 -0
- data/test/perl_output/merge6.xlsx +0 -0
- data/test/regression/{test_vml04.rb → disabled_test_vml04.rb} +0 -0
- data/test/regression/test_chart_size01.rb +41 -0
- data/test/regression/test_chart_size02.rb +41 -0
- data/test/regression/test_chart_size03.rb +39 -0
- data/test/regression/test_default_row01.rb +26 -0
- data/test/regression/test_default_row02.rb +28 -0
- data/test/regression/test_default_row03.rb +28 -0
- data/test/regression/test_default_row04.rb +31 -0
- data/test/regression/xlsx_files/chart_size01.xlsx +0 -0
- data/test/regression/xlsx_files/default_row01.xlsx +0 -0
- data/test/regression/xlsx_files/default_row02.xlsx +0 -0
- data/test/regression/xlsx_files/default_row03.xlsx +0 -0
- data/test/regression/xlsx_files/default_row04.xlsx +0 -0
- data/test/test_example_match.rb +22 -0
- data/test/worksheet/test_write_methods.rb +0 -7
- metadata +35 -22
- data/test/package/vml/test_write_anchor.rb +0 -14
- data/test/package/vml/test_write_column.rb +0 -14
- data/test/package/vml/test_write_fill.rb +0 -22
- data/test/package/vml/test_write_move_with_cells.rb +0 -14
- data/test/package/vml/test_write_row.rb +0 -14
- data/test/package/vml/test_write_shadow.rb +0 -14
- data/test/package/vml/test_write_size_with_cells.rb +0 -14
- data/test/package/vml/test_write_textbox.rb +0 -14
- 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.
|
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
|