caxlsx 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +126 -31
  3. data/README.md +78 -170
  4. data/examples/{image1.jpeg → assets/image1.jpeg} +0 -0
  5. data/examples/generate.rb +15 -0
  6. data/lib/axlsx.rb +2 -3
  7. data/lib/axlsx/drawing/bar_chart.rb +3 -3
  8. data/lib/axlsx/drawing/bar_series.rb +3 -5
  9. data/lib/axlsx/drawing/d_lbls.rb +1 -1
  10. data/lib/axlsx/drawing/pie_series.rb +1 -1
  11. data/lib/axlsx/drawing/series_title.rb +3 -1
  12. data/lib/axlsx/drawing/title.rb +3 -2
  13. data/lib/axlsx/package.rb +53 -19
  14. data/lib/axlsx/rels/relationship.rb +26 -25
  15. data/lib/axlsx/stylesheet/font.rb +10 -2
  16. data/lib/axlsx/util/constants.rb +2 -1
  17. data/lib/axlsx/util/mime_type_utils.rb +1 -1
  18. data/lib/axlsx/util/validators.rb +2 -2
  19. data/lib/axlsx/util/zip_command.rb +73 -0
  20. data/lib/axlsx/version.rb +1 -1
  21. data/lib/axlsx/workbook/workbook.rb +0 -9
  22. data/lib/axlsx/workbook/worksheet/cell.rb +32 -5
  23. data/lib/axlsx/workbook/worksheet/col.rb +8 -4
  24. data/lib/axlsx/workbook/worksheet/data_validation.rb +4 -4
  25. data/lib/axlsx/workbook/worksheet/pivot_table.rb +7 -2
  26. data/lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb +1 -1
  27. data/lib/axlsx/workbook/worksheet/rich_text_run.rb +1 -1
  28. data/lib/axlsx/workbook/worksheet/row.rb +6 -3
  29. data/lib/axlsx/workbook/worksheet/table.rb +1 -1
  30. data/lib/axlsx/workbook/worksheet/worksheet.rb +17 -4
  31. data/lib/caxlsx.rb +2 -0
  32. data/test/drawing/tc_drawing.rb +2 -2
  33. data/test/drawing/tc_hyperlink.rb +1 -1
  34. data/test/drawing/tc_one_cell_anchor.rb +1 -1
  35. data/test/drawing/tc_pic.rb +4 -4
  36. data/test/drawing/tc_pie_series.rb +2 -1
  37. data/test/drawing/tc_series_title.rb +21 -0
  38. data/test/drawing/tc_title.rb +16 -0
  39. data/test/fixtures/image1.gif +0 -0
  40. data/test/fixtures/image1.jpeg +0 -0
  41. data/test/fixtures/image1.jpg +0 -0
  42. data/test/fixtures/image1.png +0 -0
  43. data/test/fixtures/image1_fake.jpg +0 -0
  44. data/test/rels/tc_relationship.rb +8 -0
  45. data/test/stylesheet/tc_font.rb +14 -2
  46. data/test/stylesheet/tc_styles.rb +27 -1
  47. data/test/tc_axlsx.rb +6 -0
  48. data/test/tc_helper.rb +0 -2
  49. data/test/tc_package.rb +82 -13
  50. data/test/util/tc_mime_type_utils.rb +1 -1
  51. data/test/util/tc_validators.rb +1 -1
  52. data/test/workbook/worksheet/tc_cell.rb +68 -2
  53. data/test/workbook/worksheet/tc_col.rb +16 -1
  54. data/test/workbook/worksheet/tc_pivot_table.rb +8 -0
  55. data/test/workbook/worksheet/tc_pivot_table_cache_definition.rb +8 -0
  56. data/test/workbook/worksheet/tc_rich_text_run.rb +3 -2
  57. data/test/workbook/worksheet/tc_row.rb +38 -0
  58. data/test/workbook/worksheet/tc_table.rb +10 -0
  59. data/test/workbook/worksheet/tc_worksheet.rb +24 -15
  60. metadata +130 -151
  61. data/examples/2010_comments.rb +0 -17
  62. data/examples/anchor_swapping.rb +0 -28
  63. data/examples/auto_filter.rb +0 -25
  64. data/examples/basic_charts.rb +0 -58
  65. data/examples/chart_colors.rb +0 -88
  66. data/examples/colored_links.rb +0 -59
  67. data/examples/conditional_formatting/example_conditional_formatting.rb +0 -89
  68. data/examples/conditional_formatting/getting_barred.rb +0 -37
  69. data/examples/conditional_formatting/hitting_the_high_notes.rb +0 -37
  70. data/examples/conditional_formatting/scaled_colors.rb +0 -39
  71. data/examples/conditional_formatting/stop_and_go.rb +0 -37
  72. data/examples/data_validation.rb +0 -67
  73. data/examples/example.rb +0 -885
  74. data/examples/extractive.rb +0 -45
  75. data/examples/ios_preview.rb +0 -14
  76. data/examples/merge_cells.rb +0 -17
  77. data/examples/no_grid_with_borders.rb +0 -18
  78. data/examples/page_setup.rb +0 -11
  79. data/examples/pivot_table.rb +0 -39
  80. data/examples/pivot_test.rb +0 -63
  81. data/examples/sheet_protection.rb +0 -10
  82. data/examples/skydrive/real_example.rb +0 -63
  83. data/examples/split.rb +0 -16
  84. data/examples/styles.rb +0 -66
  85. data/examples/underline.rb +0 -13
  86. data/examples/wrap_text.rb +0 -21
  87. data/lib/axlsx/util/parser.rb +0 -44
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ed41402c88039c2627ffba600babaf4891f260c120262d40a8ae2759ca9dca3
4
- data.tar.gz: ed7540073afe8febc4435eb3bdf0503843e61ce3edb52c2df22fe79708727a2a
3
+ metadata.gz: dfea731879b2415d4ed0ac46abfbad17483d7e9f2c27802aef87a93823589af7
4
+ data.tar.gz: 709606e3d36fe21ac41a8f9381d4017c31103d6ce0a8686eb195a935c3626538
5
5
  SHA512:
6
- metadata.gz: 6562cf90cfbf0b9a42012ac225a586e0900486e44930ca5c8ee3e6c3f4c2d3f6d66b8566ac81854f48106bf78732e076ee5cf2771d1cc2ba6abf2cf22dc966e2
7
- data.tar.gz: fd1af696b89b4d4a6594e6ef4eb55d98a3170dfa23d9b96bf06de13692b0957bf4c0a329014b2c9be9ca05337845e83bad0b5644c14ac7862eb26ab981f41f7b
6
+ metadata.gz: cd1fd47bfe33dafa4909960d326f81433b4fa3e18d1a6f6f99e7a13617eecc98f212e2a938788d53466a47b52a0a2325a8dfcb3a6c3b52def5325b75ead9d402
7
+ data.tar.gz: bd9deebebd7cfc2222e64a8485ec9951ece3a69bb695fad5f4a790166324dab45134e835d02dc503e6c37e70b27d586db8bccf0c847448944f50ef37205e53d6
data/CHANGELOG.md CHANGED
@@ -1,19 +1,105 @@
1
1
  CHANGELOG
2
2
  ---------
3
- - **April.1.17**:3.0.0-pre
3
+
4
+ - **March.27.21**: 3.1.0
5
+ - [PR #95](https://github.com/caxlsx/caxlsx/pull/95) - Replace mimemagic with marcel
6
+ - [PR #87](https://github.com/caxlsx/caxlsx/pull/87) - Implement :offset option for worksheet#add_row
7
+ - [PR #79](https://github.com/caxlsx/caxlsx/pull/79) - Add support for format in pivot tables
8
+ - [PR #77](https://github.com/caxlsx/caxlsx/pull/77) - Fix special characters in table header
9
+ - [PR #57](https://github.com/caxlsx/caxlsx/pull/57) - Deprecate using #serialize with boolean argument: Calls like `Package#serialize("name.xlsx", false)` should be replaced with `Package#serialize("name.xlsx", confirm_valid: false)`.
10
+
11
+ - **January.5.21**: 3.0.4
12
+ - [PR #72](https://github.com/caxlsx/caxlsx/pull/72) - Relax Ruby dependency to allow for Ruby 3. This required Travis to be upgraded from Ubuntu Trusty to Ubuntu Bionic. rbx-3 was dropped.
13
+ - [PR #71](https://github.com/caxlsx/caxlsx/pull/71) - Adds date type to validator so sheet.add_data_validation works with date type. Addresses [I #26](https://github.com/caxlsx/caxlsx/issues/26) - Date Data Validation not working
14
+ - [PR #70](https://github.com/caxlsx/caxlsx/pull/70) - Fix worksheet title length enforcement caused by switching from size to bytesize. Addresses [I #67](https://github.com/caxlsx/caxlsx/issues/67) - character length error in worksheet name when using Japanese, which was introduced by addressing [I #588](https://github.com/randym/axlsx/issues/588) in the old Axlsx repo.
15
+
16
+
17
+ - **December.7.20**: 3.0.3
18
+ - [PR #62](https://github.com/caxlsx/caxlsx/pull/62) - Fix edge cases in format detection for objects whose string representation made them look like numbers but the object didn’t respond to `#to_i` or `#to_f`.
19
+ - [PR #56](https://github.com/caxlsx/caxlsx/pull/56) - Add `zip_command` option to `#serialize` for faster serialization of large Excel files by using a zip binary
20
+ - [PR #54](https://github.com/caxlsx/caxlsx/pull/54) - Fix type detection for floats with out-of-rage exponents
21
+ - [I #67](https://github.com/caxlsx/caxlsx/issues/67) - Fix regression in worksheet name length enforcement: Some unicode characters were counted incorrectly, so that names that previously worked fine now stopped working. (This was introduced in 3.0.2)
22
+
23
+ - **July.16.20**: 3.0.2
24
+ - [I #51](https://github.com/caxlsx/caxlsx/issues/51) - Images do not import on Windows. IO read set explicitly to binary mode.
25
+ - [PR #53](https://github.com/caxlsx/caxlsx/pull/53) - Limit column width to 255. Maximum column width limit in MS Excel is 255 characters, see https://support.microsoft.com/en-us/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3
26
+ - [PR #44](https://github.com/caxlsx/caxlsx/pull/44) - Improve cell autowidth calculations. Previously columns with undefined/auto width would tend to be just slightly too small for the content. This is because certain letters were being excluded from the width calculation because they were deemed not wide enough. We now treat all characters as equal width which helps ensure columns auto-widths are actually large enough for the content. This will gain us a very slight performance improvement because of we are no longer searching the string for specific characters.
27
+
28
+ - **October.4.19**: 3.0.1
29
+ - Support for ruby versions limited to officially supported version (Ruby v2.3+)
30
+ - Updates to dependency gems, especially nokogiri and ruby-zip
31
+ - Fix Relationship.instances cache
32
+ - Autoload fix for Rails
33
+
34
+ - **October.4.19**: 2.0.2
35
+ - Released as caxlsx, fork of axlsx
36
+ - Update ruby-zip dependency (fixes https://github.com/randym/axlsx/issues/536)
37
+
38
+ - **September.17.19**: 3.0.0
39
+ - First release of caxlsx, fork of axlsx
40
+
41
+ - **April.1.17**: 3.0.0-pre
4
42
  - Support for ruby versions limited to officially supported version
5
43
  - Updates to dependency gems, especially nokogiri and ruby-zip
6
44
  - Patch options parsing for two cell anchor
7
45
  - Remove support for depreciated worksheet members
8
- - **November.25.12**:1.3.4
46
+ - Added Cell#name so you you can quickly create a defined name for a single cell in your workbook.
47
+ - Added full book view and sheet state management. This means you can specify how the workbook renders as well as manage sheet visibility.
48
+ - Added smoothing management for line charts series
49
+
50
+ - **September.12.13**: 2.0.1
51
+ - Unpinned rubyzip version
52
+
53
+ - **September.12.13**: 2.0.0
54
+ - DROPPED support for ruby 1.8.7
55
+ - Altered readme to link to contributors
56
+ - Lots of improvements to make charts and relations more stable.
57
+ - Patched color param mutation.
58
+ - Data sourced for pivot tables can now come from other sheets.
59
+ - Altered image file extension comparisons to be case insensitive.
60
+ - Added control character sanitization to shared strings.
61
+ - Added page breaks. see examples/example.rb for an example.
62
+ - Bugfix: single to dual cell anchors for images now swap properly so you can set the end_at position during instantiation, in a block or directly on the image.
63
+ - Improved how we convert date/time to include the UTC offset when provided.
64
+ - Pinned rubyzip to 0.9.9 for those who are not ready to go up. Please note that release 2.0.1 and on will be using the 1.n.n series of rubyzip
65
+ - Bugfix: transposition of cells for Worksheet#cols now supports
66
+ incongruent column counts.counts
67
+ - Added space preservation for cell text. This will allow whitespace
68
+ in cell text both when using shared strings and when serializing
69
+ directly to the cell.
70
+
71
+ - **April.24.13**: 1.3.6
72
+ - Fixed LibreOffice/OpenOffice issue to properly apply colors to lines
73
+ in charts.
74
+ - Added support for specifying between/notBetween formula in an array.
75
+ *thanks* straydogstudio!
76
+ - Added standard line chart support. *thanks* scambra
77
+ - Fixed straydogstudio's link in the README. *thanks* nogara!
78
+
79
+ - **February.4.13**: 1.3.5
80
+ - converted vary_colors for chart data to instance variable with appropriate defulats for the various charts.
81
+ - Added trust_input method on Axlsx to instruct the serializer to skip HTML escaping. This will give you a tremendous performance boost,
82
+ Please be sure that you will never have <, >, etc in your content or the XML will be invalid.
83
+ - Rewrote cell serialization to improve performance
84
+ - Added iso_8601 type to support text based date and time management.
85
+ - Bug fix for relationship management in drawings when you add images
86
+ and charts to the same worksheet drawing.
87
+ - Added outline_level_rows and outline_level_columns to worksheet to simplify setting up outlining in the worksheet.
88
+ - Added support for pivot tables
89
+ - Added support for descrete border edge styles
90
+ - Improved validation of sheet names
91
+ - Added support for formula value caching so that iOS and OSX preview can show the proper values. See Cell.add_row and the formula_values option.
92
+
93
+ - **November.25.12**: 1.3.4
9
94
  - Support for headers and footers for worksheets
10
95
  - bug fix: Properly escape hyperlink urls
11
96
  - Improvements in color_scale generation for conditional formatting
12
97
  - Improvements in autowidth calculation.
13
- - **November.8.12**:1.3.3
98
+
99
+ - **November.8.12**: 1.3.3
14
100
  - Patched cell run styles for u and validation for family
15
101
 
16
- - **November.5.12**:1.3.2
102
+ - **November.5.12**: 1.3.2
17
103
  - MASSIVE REFACTORING
18
104
  - Patch for apostrophes in worksheet names
19
105
  - added sheet_by_name for workbook so you can now find your worksheets
@@ -21,6 +107,7 @@ CHANGELOG
21
107
  - added insert_worksheet so you can now add a worksheet to an
22
108
  arbitrary position in the worksheets list.
23
109
  - reduced memory consumption for package parts post serialization
110
+
24
111
  - **September.30.12**: 1.3.1
25
112
  - Improved control character handling
26
113
  - Added stored auto filter values and date grouping items
@@ -29,29 +116,35 @@ CHANGELOG
29
116
  all the predefined table styles.
30
117
  - Improved style management for fonts so they merge undefined values
31
118
  from the initial master.
119
+
32
120
  - **September.8.12**: 1.2.3
33
121
  - enhance exponential float/bigdecimal values rendering as strings intead
34
122
  of 'numbers' in excel.
35
123
  - added support for :none option on chart axis labels
36
124
  - added support for paper_size option on worksheet.page_setup
125
+
37
126
  - **August.27.12**: 1.2.2
38
127
  - minor patch for auto-filters
39
128
  - minor documentation improvements.
129
+
40
130
  - **August.12.12**: 1.2.1
41
131
  - Add support for hyperlinks in worksheets
42
132
  - Fix example that was using old style cell merging with concact.
43
133
  - Fix bug that occurs when calculating the font_size for cells that use a user specified style which does not define sz
134
+
44
135
  - **August.5.12**: 1.2.0
45
136
  - rebuilt worksheet serialization to clean up the code base a bit.
46
137
  - added data labels for charts
47
138
  - added table header printing for each sheet via defined_name. This
48
139
  means that when you print your worksheet, the header rows show for every page
49
- - **July.??.12**: 1.1.9 release
140
+
141
+ - **July.??.12**: 1.1.9
50
142
  - lots of code clean up for worksheet
51
143
  - added in data labels for pie charts, line charts and bar charts.
52
144
  - bugfix chard with data in a sheet that has a space in the name are
53
145
  now auto updating formula based values
54
- - **July.14.12**: 1.1.8 release
146
+
147
+ - **July.14.12**: 1.1.8
55
148
  - added html entity encoding for sheet names. This allows you to use
56
149
  characters like '<' and '&' in your sheet names.
57
150
  - new - first round google docs interoperability
@@ -60,7 +153,8 @@ CHANGELOG
60
153
  to PDF from Libra Office
61
154
  - various readability improvements and work standardizing attribute
62
155
  names to snake_case. Aliases are provided for backward compatiblity
63
- - **June.11.12**: 1.1.7 release
156
+
157
+ - **June.11.12**: 1.1.7
64
158
  - fix chart rendering issue when label offset is specified as a
65
159
  percentage in serialization and ensure that formula are not stored
66
160
  in value caches
@@ -68,7 +162,8 @@ in value caches
68
162
  - Add title property to axis so you can lable the x/y/series axis for
69
163
  charts.
70
164
  - Add sheet views with panes
71
- - **May.30.12**: 1.1.6 release
165
+
166
+ - **May.30.12**: 1.1.6
72
167
  - data protection with passwords for sheets
73
168
  - cell level input validators
74
169
  - added support for two cell anchors for images
@@ -78,14 +173,15 @@ in value caches
78
173
  - added ph (phonetics) and s (style) attributes for row.
79
174
  - resolved all warnings generating from this gem.
80
175
  - improved comment relationship management for multiple comments
81
- - **May.13.12**: 1.1.5 release
176
+
177
+ - **May.13.12**: 1.1.5
82
178
  - MOAR print options! You can now specify paper size, orientation,
83
179
  fit to width, page margings and gridlines for printing.
84
180
  - Support for adding comments to your worksheets
85
181
  - bugfix for applying style to empty cells
86
182
  - bugfix for parsing formula with multiple '='
87
183
 
88
- - **May.3.12:**: 1.1.4 release
184
+ - **May.3.12:**: 1.1.4
89
185
  - MOAR examples
90
186
  - added outline level for rows and columns
91
187
  - rebuild of numeric and axis data sources for charts
@@ -97,23 +193,23 @@ in value caches
97
193
  - Added support for specifying the color of data series in charts.
98
194
  - bugfix using add_cell on row mismanaged calls to update_column_info.
99
195
 
100
- - ** April.25.12:**: 1.1.3 release
196
+ - ** April.25.12:**: 1.1.3
101
197
  - Primarily because I am stupid.....Updates to readme to properly report version, add in missing docs and restructure example directory.
102
198
 
103
- - ** April.25.12:**: 1.1.2 release
199
+ - ** April.25.12:**: 1.1.2
104
200
  - Conditional Formatting completely implemented.
105
201
  - refactoring / documentation for Style#add_style
106
202
  - added in label rotation for chart axis labels
107
203
  - bugfix to properly assign style and type info to cells when only partial information is provided in the types/style option
108
204
 
109
- - ** April.18.12**: 1.1.1 release
205
+ - ** April.18.12**: 1.1.1
110
206
  - bugfix for autowidth calculations across multiple rows
111
207
  - bugfix for dimension calculations with nil cells.
112
208
  - REMOVED RMAGICK dependency WOOT!
113
209
  - Update readme to show screenshot of gem output.
114
210
  - Cleanup benchmark and add benchmark rake task
115
211
 
116
- - ** April.3.12**: 1.1.0 release
212
+ - ** April.3.12**: 1.1.0
117
213
  - bugfix patch name_to_indecies to properly handle extended ranges.
118
214
  - bugfix properly serialize chart title.
119
215
  - lower rake minimum requirement for 1.8.7 apps that don't want to move on to 0.9 NOTE this will be reverted for 2.0.0 with workbook parsing!
@@ -128,7 +224,7 @@ in value caches
128
224
  - Major (like 7x faster!) performance updates.
129
225
  - Gem now supports for JRuby 1.6.7, as well as experimental support for Rubinius
130
226
 
131
- - ** March.5.12**: 1.0.18 release
227
+ - ** March.5.12**: 1.0.18
132
228
  https://github.com/randym/axlsx/compare/1.0.17...1.0.18
133
229
  - bugfix custom borders are not properly applied when using styles.add_style
134
230
  - interop worksheet names must be 31 characters or less or some versions of office complain about repairs
@@ -138,14 +234,14 @@ in value caches
138
234
  - added << alias for add_row
139
235
  - removed presetting of date1904 based on authoring platform. Now defaults to use 1900 epoch (date1904 = false)
140
236
 
141
- - ** February.14.12**: 1.0.17 release
237
+ - ** February.14.12**: 1.0.17
142
238
  https://github.com/randym/axlsx/compare/1.0.16...1.0.17
143
239
  - Added in support for serializing to StringIO
144
240
  - Added in support for using shared strings table. This makes most of the features in axlsx interoperable with iWorks Numbers
145
241
  - Added in support for fixed column_widths
146
242
  - Removed unneeded dependencies on active-support and i18n
147
243
 
148
- - ** February.2.12**: 1.0.16 release
244
+ - ** February.2.12**: 1.0.16
149
245
  https://github.com/randym/axlsx/compare/1.0.15...1.0.16
150
246
  - Bug fix for schema file locations when validating in rails
151
247
  - Added hyperlink to images
@@ -153,14 +249,14 @@ in value caches
153
249
  - removed whitespace/indentation from xml outputs
154
250
  - col_style now skips rows that do not contain cells at the column index
155
251
 
156
- - **January.6.12**: 1.0.15 release
252
+ - **January.6.12**: 1.0.15
157
253
  https://github.com/randym/axlsx/compare/1.0.14...1.0.15
158
254
  - Bug fix add_style specified number formats must be explicity applied for libraOffice
159
255
  - performance improvements from ochko when creating cells with options.
160
256
  - Bug fix setting types=>[:n] when adding a row incorrectly determines the cell type to be string as the value is null during creation.
161
257
  - Release in preparation for password protection merge
162
258
 
163
- - **December.14.11**: 1.0.14 release
259
+ - **December.14.11**: 1.0.14
164
260
  - Added support for merging cells
165
261
  - Added support for auto filters
166
262
  - Improved auto width calculations
@@ -169,14 +265,14 @@ in value caches
169
265
  - Added access to app and core package objects so you can set the creator and other properties of the package
170
266
  - The beginning of password protected xlsx files - roadmapped for January release.
171
267
 
172
- - **December.8.11**: 1.0.13 release
268
+ - **December.8.11**: 1.0.13
173
269
  - Fixing .gemspec errors that caused gem to miss the lib directory. Sorry about that.
174
270
 
175
- - **December.7.11**: 1.0.12 release
271
+ - **December.7.11**: 1.0.12
176
272
  DO NOT USE THIS VERSION = THE GEM IS BROKEN
177
273
  - changed dependency from 'zip' gem to 'rubyzip' and added conditional code to force binary encoding to resolve issue with excel 2011
178
274
  - Patched bug in app.xml that would ignore user specified properties.
179
- - **December.5.11**: 1.0.11 release
275
+ - **December.5.11**: 1.0.11
180
276
  - Added [] methods to worksheet and workbook to provide name based access to cells.
181
277
  - Added support for functions as cell values
182
278
  - Updated color creation so that two character shorthand values can be used like 'FF' for 'FFFFFFFF' or 'D8' for 'FFD8D8D8'
@@ -184,7 +280,7 @@ in value caches
184
280
  - Clean up and support for 1.9.2 and travis integration
185
281
  - Added support for string based cell referencing to chart start_at and end_at. That means you can now use :start_at=>"A1" when using worksheet.add_chart, or chart.start_at ="A1" in addition to passing a cell or the x, y coordinates.
186
282
 
187
- - **October.30.11**: 1.0.10 release
283
+ - **October.30.11**: 1.0.10
188
284
  - Updating gemspec to lower gem version requirements.
189
285
  - Added row.style assignation for updating the cell style for an entire row
190
286
  - Added col_style method to worksheet upate a the style for a column of cells
@@ -194,11 +290,11 @@ in value caches
194
290
  - fixed out of range bug in time calculations for 32bit time.
195
291
  - added i18n for active support
196
292
 
197
- - **October.26.11**: 1.0.9 release
293
+ - **October.26.11**: 1.0.9
198
294
  - Updated to support ruby 1.9.3
199
295
  - Updated to eliminate all warnings originating in this gem
200
296
 
201
- - **October.23.11**: 1.0.8 release
297
+ - **October.23.11**: 1.0.8
202
298
  - Added support for images (jpg, gif, png) in worksheets.
203
299
 
204
300
  - **October.23.11**: 1.0.7 released
@@ -212,10 +308,10 @@ in value caches
212
308
  - rebuild of anchor positioning to remove some spagetti code. Chart now supports a start_at and end_at method that accept an arrar for col/row positioning. See example6 for an example. You can still pass :start_at and :end_at options to worksheet.add_chart.
213
309
  - Refactored cat and val axis data to keep series serialization a bit more DRY
214
310
 
215
- ##October.22.11: 1.0.6 release
311
+ - **October.22.11**: 1.0.6
216
312
  - Bumping version to include docs. Bug in gemspec pointing to incorrect directory.
217
313
 
218
- ##October.22.11: 1.05
314
+ - **October.22.11**: 1.05
219
315
  - Added support for line charts
220
316
  - Updated examples and readme
221
317
  - Updated series title to be a real title ** NOTE ** If you are accessing titles directly you will need to update text assignation.
@@ -231,14 +327,13 @@ in value caches
231
327
  - Added style property to charts
232
328
  - Removed serialization write test as it most commonly fails when run from the gem's intalled directory
233
329
 
234
- ##October.21.11: 1.0.4
330
+ - **October.21.11**: 1.0.4
235
331
  - altered package to accept a filename string for serialization instead of a File object.
236
332
  - Updated specs to conform
237
333
  - More examples for readme
238
334
 
239
335
 
240
- ##October.21.11: 1.0.3 release
336
+ - **October.21.11**: 1.0.3
241
337
  - Updated documentation
242
338
 
243
- ##October.20.11: 0.1.0 release
244
-
339
+ - **October.20.11**: 0.1.0
data/README.md CHANGED
@@ -1,92 +1,37 @@
1
- Notice: Community Axlsx organization
2
- ===================================================
3
- All Axlsx related gems have been forked or moved to a community organization: http://github.com/caxlsx
4
- * Axlsx
5
- * acts_as_axlsx
6
- * axlsx_rails
7
- * activeadmin-axlsx
1
+ # Caxlsx (Community Continued Version)
2
+ [![Build Status](https://travis-ci.com/caxlsx/caxlsx.svg?branch=master)](https://travis-ci.com/caxlsx/caxlsx)
3
+ [![Gem
4
+ Version](https://badge.fury.io/rb/caxlsx.svg)](http://badge.fury.io/rb/caxlsx)
5
+ ![Total downloads](http://ruby-gem-downloads-badge.herokuapp.com/caxlsx?type=total)
6
+ ![Downloads for 3.0.4 (latest)](http://ruby-gem-downloads-badge.herokuapp.com/caxlsx/3.0.4?label=downloads%203.0.4)
8
7
 
9
- The gems will be released as is as a starting point to allow releases of other gems that depend on these gems. Submit issues as usual.
8
+ ## Notice: Community Axlsx Organization
10
9
 
11
- Please consider helping develop and test these gems.
10
+ To better maintain the Axlsx ecosystem, all related gems have been forked or moved to the following community organization:
12
11
 
13
- Axlsx: Office Open XML Spreadsheet Generation
14
- ====================================
15
- [![Build Status](https://secure.travis-ci.org/randym/axlsx.svg?branch=master)](http://travis-ci.org/randym/axlsx/)
12
+ http://github.com/caxlsx
16
13
 
17
- If you are using axlsx for commercial purposes, or just want to show your
18
- appreciation for the gem, please don't hesitate to make a donation.
14
+ [Join the Caxlsx Slack channel](https://join.slack.com/t/caxlsx/shared_invite/enQtOTI5OTM0MzI1Njk5LTBlMDQzNDk2YzkwODMxMmVkODMyYzJiZGU5NTQ3YTg5NTBlN2IwZTlmNTRjNzhiY2E0MDY2OTEyYmFlODI5NjA)
19
15
 
20
- **IRC**:[irc.freenode.net / #axlsx](irc://irc.freenode.net/axlsx)
21
-
22
- **Git**:[http://github.com/caxlsx/axlsx](http://github.com/randym/axlsx)
23
-
24
- **Google Group**: [https://groups.google.com/forum/?fromgroups#!forum/axlsx](https://groups.google.com/forum/?fromgroups#!forum/axlsx)
25
-
26
- **Author**: Randy Morgan
27
-
28
- **Copyright**: 2011 - 2017
29
-
30
- **License**: MIT License
31
-
32
- **Latest Version**: 3.0.0
33
-
34
- **Ruby Version**: 2.2.7, 2.3.4, 2.4.1
35
-
36
- **JRuby Version**: 1.9 modes
37
-
38
- **Rubinius Version**: rubinius 3 * lower versions may run, this gem always tests against head.
39
-
40
- **Release Date**: September 12th 2013
41
-
42
- If you are working in rails, or with active record see:
43
- [acts_as_xlsx](http://github.com/caxlsx/acts_as_xlsx)
44
-
45
- acts_as_xlsx is a simple ActiveRecord mixin that lets you generate a workbook with:
46
-
47
- ```ruby
48
- Posts.where(created_at > Time.now-30.days).to_xlsx
49
- ```
50
-
51
- ** and **
52
-
53
- * http://github.com/caxlsx/axlsx_rails
54
- Axlsx_Rails provides an Axlsx renderer so you can move all your spreadsheet code from your controller into view files. Partials are supported so you can organize any code into reusable chunks (e.g. cover sheets, common styling, etc.) You can use it with acts_as_xlsx, placing the to_xlsx call in a view and add ':package => xlsx_package' to the parameter list. Now you can keep your controllers thin!
55
-
56
- There are guides for using axlsx and acts_as_xlsx here:
57
- [http://axlsx.blog.randym.net](http://axlsx.blog.randym.net)
58
-
59
- If you are working with ActiveAdmin see:
60
-
61
- [activeadmin-axlsx](http://github.com/caxlsx/activeadmin-axlsx)
62
-
63
- It provides a plugin and dsl for generating downloadable reports.
64
-
65
- The examples directory contains a number of more specific examples as
66
- well.
67
-
68
- Synopsis
69
- --------
16
+ ## Synopsis
70
17
 
71
18
  Axlsx is an Office Open XML Spreadsheet generator for the Ruby programming language.
72
19
  With Axlsx you can create excel worksheets with charts, images (with links), automated and fixed column widths, customized styles, functions, tables, conditional formatting, print options, comments, merged cells, auto filters, file and stream serialization as well as full schema validation. Axlsx excels at helping you generate beautiful Office Open XML Spreadsheet documents without having to understand the entire ECMA specification.
73
20
 
74
- ![Screen 1](https://github.com/caxlsx/axlsx/raw/master/examples/sample.png)
75
-
21
+ ![Screen 1](https://github.com/caxlsx/caxlsx/raw/master/examples/sample.png)
76
22
 
77
23
 
78
- Feature List
79
- ------------
24
+ ## Feature List
80
25
 
81
- 1. Author xlsx documents: Axlsx is made to let you easily and quickly generate professional xlsx based reports that can be validated before serialization.
26
+ 1. Author xlsx documents: Caxlsx is made to let you easily and quickly generate professional xlsx based reports that can be validated before serialization.
82
27
 
83
- 2. Generate 3D Pie, Line, Scatter and Bar Charts: With Axlsx chart generation and management is as easy as a few lines of code. You can build charts based off data in your worksheet or generate charts without any data in your sheet at all. Customize gridlines, label rotation and series colors as well.
28
+ 2. Generate 3D Pie, Line, Scatter and Bar Charts: With Caxlsx chart generation and management is as easy as a few lines of code. You can build charts based off data in your worksheet or generate charts without any data in your sheet at all. Customize gridlines, label rotation and series colors as well.
84
29
 
85
30
  3. Custom Styles: With guaranteed document validity, you can style borders, alignment, fills, fonts, and number formats in a single line of code. Those styles can be applied to an entire row, or a single cell anywhere in your workbook.
86
31
 
87
- 4. Automatic type support: Axlsx will automatically determine the type of data you are generating. In this release Float, Integer, String, Date, Time and Boolean types are automatically identified and serialized to your spreadsheet.
32
+ 4. Automatic type support: Caxlsx will automatically determine the type of data you are generating. In this release Float, Integer, String, Date, Time and Boolean types are automatically identified and serialized to your spreadsheet.
88
33
 
89
- 5. Automatic and fixed column widths: Axlsx will automatically determine the appropriate width for your columns based on the content in the worksheet, or use any value you specify for the really funky stuff.
34
+ 5. Automatic and fixed column widths: Caxlsx will automatically determine the appropriate width for your columns based on the content in the worksheet, or use any value you specify for the really funky stuff.
90
35
 
91
36
  6. Support for automatically formatted 1904 and 1900 epochs configurable in the workbook.
92
37
 
@@ -122,18 +67,14 @@ and Numbers
122
67
 
123
68
  22. Page Breaks
124
69
 
125
- Installing
126
- ----------
127
70
 
128
- To install Axlsx, use the following command:
71
+ ## Install
129
72
 
130
- $ gem install axlsx
131
-
132
- #Examples
133
- ------
73
+ ```ruby
74
+ gem 'caxlsx'
75
+ ```
134
76
 
135
- The example listing is getting overly large to maintain here.
136
- If you are using Yard, you will be able to see the examples in line below.
77
+ ## Usage
137
78
 
138
79
  Here's a teaser that kicks about 2% of what the gem can do.
139
80
 
@@ -150,75 +91,40 @@ Axlsx::Package.new do |p|
150
91
  end
151
92
  ```
152
93
 
153
- Please see the [examples](https://github.com/caxlsx/axlsx/tree/master/examples/example.rb) for more.
154
-
155
- {include:file:examples/example.rb}
156
-
157
- There is much, much more you can do with this gem. If you get stuck, grab me on IRC or submit an issue to GitHub. Chances are that it has already been implemented. If it hasn't - let's take a look at adding it in.
158
-
159
- #Documentation
160
- --------------
161
-
162
- This gem is 100% documented with YARD, an exceptional documentation library. To see documentation for this, and all the gems installed on your system use:
163
-
164
- gem install yard kramdown
165
-
166
- yard server -g
167
-
168
- #Specs
169
- ------
170
-
171
- This gem has 100% test coverage using test/unit. To execute tests for this gem, simply run rake in the gem directory.
172
-
173
- #Change log
174
- ---------
175
- - **
176
- - Added Cell#name so you you can quickly create a defined name for a single cell in your workbook.
177
- - Added full book view and sheet state management. This means you can specify how the workbook renders as well as manage sheet visibility.
178
- - Added smoothing management for line charts series
179
- - **September.12.13**:2.0.1
180
- - Unpinned rubyzip version
181
- - **September.12.13**:2.0.0
182
- - DROPPED support for ruby 1.8.7
183
- - Altered readme to link to contributors
184
- - Lots of improvements to make charts and relations more stable.
185
- - Patched color param mutation.
186
- - Data sourced for pivot tables can now come from other sheets.
187
- - Altered image file extension comparisons to be case insensitive.
188
- - Added control character sanitization to shared strings.
189
- - Added page breaks. see examples/example.rb for an example.
190
- - Bugfix: single to dual cell anchors for images now swap properly so you can set the end_at position during instantiation, in a block or directly on the image.
191
- - Improved how we convert date/time to include the UTC offset when provided.
192
- - Pinned rubyzip to 0.9.9 for those who are not ready to go up. Please note that release 2.0.1 and on will be using the 1.n.n series of rubyzip
193
- - Bugfix: transposition of cells for Worksheet#cols now supports
194
- incongruent column counts.counts
195
- - Added space preservation for cell text. This will allow whitespace
196
- in cell text both when using shared strings and when serializing
197
- directly to the cell.
198
- - **April.24.13**:1.3.6
199
- - Fixed LibreOffice/OpenOffice issue to properly apply colors to lines
200
- in charts.
201
- - Added support for specifying between/notBetween formula in an array.
202
- *thanks* straydogstudio!
203
- - Added standard line chart support. *thanks* scambra
204
- - Fixed straydogstudio's link in the README. *thanks* nogara!
205
- - **February.4.13**:1.3.5
206
- - converted vary_colors for chart data to instance variable with appropriate defulats for the various charts.
207
- - Added trust_input method on Axlsx to instruct the serializer to skip HTML escaping. This will give you a tremendous performance boost,
208
- Please be sure that you will never have <, >, etc in your content or the XML will be invalid.
209
- - Rewrote cell serialization to improve performance
210
- - Added iso_8601 type to support text based date and time management.
211
- - Bug fix for relationahip management in drawings when you add images
212
- and charts to the same worksheet drawing.
213
- - Added outline_level_rows and outline_level_columns to worksheet to simplify setting up outlining in the worksheet.
214
- - Added support for pivot tables
215
- - Added support for descrete border edge styles
216
- - Improved validation of sheet names
217
- - Added support for formula value caching so that iOS and OSX preview can show the proper values. See Cell.add_row and the formula_values option.
218
-
219
- Please see the {file:CHANGELOG.md} document for past release information.
220
-
221
- # Known interoperability issues.
94
+ Please see the [examples folder](https://github.com/caxlsx/caxlsx/tree/master/examples) for further information on what you can do with this gem Chances are that it has already been implemented. If it hasn't, let's take a look at adding it in.
95
+
96
+ ## Documentation
97
+
98
+ Detailed documentation is available at:
99
+
100
+ [https://www.rubydoc.info/gems/caxlsx/](https://www.rubydoc.info/gems/caxlsx/)
101
+
102
+ Additional documentation is listed below:
103
+
104
+ - [Examples](https://github.com/caxlsx/caxlsx/tree/master/examples)
105
+ - [FAQ](https://github.com/caxlsx/caxlsx/wiki/FAQ) (work in progress)
106
+ - [Style Reference](https://github.com/caxlsx/caxlsx/blob/master/docs/style_reference.md)
107
+ - [Header and Footer Codes](https://github.com/caxlsx/caxlsx/blob/master/docs/header_and_footer_codes.md)
108
+
109
+ ⚠ Please __do not create issues__ for questions regarding the usage of axlsx / caxlsx. Look through this README, the [examples](https://github.com/caxlsx/caxlsx/tree/master/examples/example.rb), and the [FAQ](https://github.com/caxlsx/caxlsx/wiki/FAQ), and also check [questions tagged `axlsx` on Stack Overflow](https://stackoverflow.com/questions/tagged/axlsx).
110
+
111
+ Feel free to add your question (including an answer!) to the FAQ if you think it is of general interest.
112
+
113
+ ## Plugins, Integrations, and Extensions
114
+
115
+ Currently the following additional gems are available:
116
+
117
+ - [acts_as_caxlsx](https://github.com/caxlsx/acts_as_caxlsx)
118
+ * Provides simple ActiveRecord integration
119
+ - [caxlsx_rails](https://github.com/caxlsx/caxlsx_rails)
120
+ * Provides a `.axlsx` renderer to Rails so you can move all your spreadsheet code from your controller into view files.
121
+ - [activeadmin-caxlsx](https://github.com/caxlsx/activeadmin-caxlsx)
122
+ * An Active Admin plugin that includes DSL to create downloadable reports.
123
+ - [axlsx_styler](https://github.com/axlsx-styler-gem/axlsx_styler)
124
+ * Allows you to build clean and maintainable styles for your axlsx spreadsheets. Build your spreadsheeet with data and then apply styles later.
125
+
126
+ ## Known Software Interoperability Issues
127
+
222
128
  As axslx implements the Office Open XML (ECMA-376 spec) much of the
223
129
  functionality is interoperable with other spreadsheet software. Below is
224
130
  a listing of some known issues.
@@ -235,30 +141,32 @@ related to themes, which axlsx does not implement at this time.
235
141
  - Images are known to not work with google docs
236
142
  - border colors do not work
237
143
 
238
- 3. Numbers
239
- - you must set 'use_shared_strings' to true. This is most
240
- conveniently done just before rendering by calling Package.use_shared_strings = true prior to serialization.
241
-
242
- ```ruby
243
- p = Axlsx::Package.new
244
- p.workbook.add_worksheet(:name => "Basic Worksheet") do |sheet|
245
- sheet.add_row ["First Column", "Second", "Third"]
246
- sheet.add_row [1, 2, 3]
247
- end
248
- p.use_shared_strings = true
249
- p.serialize('simple.xlsx')
250
- ```
144
+ 3. Apple Numbers
251
145
  - charts do not render
146
+ - you must set 'use_shared_strings' to true. This is most conveniently done just before rendering by calling Package.use_shared_strings = true prior to serialization.
147
+
148
+ ```ruby
149
+ p = Axlsx::Package.new
150
+ p.workbook.add_worksheet(:name => "Basic Worksheet") do |sheet|
151
+ sheet.add_row ["First Column", "Second", "Third"]
152
+ sheet.add_row [1, 2, 3]
153
+ end
154
+ p.use_shared_strings = true
155
+ p.serialize('simple.xlsx')
156
+ ```
157
+
158
+ ## Known Bugs
159
+
160
+ There’s a [list of known bugs](https://github.com/caxlsx/caxlsx/issues?q=label%3A%22known+bug%22). (If you want to contribute to caxlsx, this is a good place to start!)
252
161
 
162
+ ## Contributing
253
163
 
254
- #Thanks!
164
+ See [CONTRIBUTING.md](https://github.com/caxlsx/caxlsx/blob/master/CONTRIBUTING.md)
255
165
 
256
- Open source software is a community effort. None of this could have been
257
- done without the help of these awesome folks.
166
+ ## Credits
258
167
 
259
- [contributors](https://github.com/caxlsx/axlsx/graphs/contributors)
168
+ Originally created by Randy Morgan - @randym
260
169
 
261
- #License
262
- ----------
170
+ Forked in 2019, to enable the community to maintain the Axlsx ecosystem - http://github.com/caxlsx
263
171
 
264
- Axlsx is licensed under the MIT license. Please see the LICENSE document for more information.
172
+ Open source software is a community effort. None of this could have been done without the help of [our Contributors](https://github.com/caxlsx/caxlsx/graphs/contributors).