spreadsheet 1.2.2 → 1.2.7

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.
data/GUIDE.md DELETED
@@ -1,339 +0,0 @@
1
- # Getting Started with Spreadsheet
2
- This guide is meant to get you started using Spreadsheet. By the end of it,
3
- you should be able to read and write Spreadsheets.
4
-
5
- Before you can do anything, you first need to make sure all that code is
6
- loaded:
7
-
8
- ```ruby
9
- require 'spreadsheet'
10
- ```
11
-
12
- ## Reading is easy!
13
-
14
- Worksheets come in various encodings. You need to tell Spreadsheet which
15
- encoding you want to deal with. The default is UTF-8
16
-
17
- ```ruby
18
- Spreadsheet.client_encoding = 'UTF-8'
19
- ```
20
-
21
- Let's open a workbook:
22
-
23
- ```ruby
24
- book = Spreadsheet.open '/path/to/an/excel-file.xls'
25
- ```
26
-
27
- We can either access all the worksheets in a workbook...
28
-
29
- ```ruby
30
- book.worksheets
31
- ```
32
-
33
- ...or access them by index or name (encoded in your `client_encoding`).
34
-
35
- ```ruby
36
- sheet1 = book.worksheet 0
37
- sheet2 = book.worksheet 'Sheet1'
38
- ```
39
-
40
- Now you can either iterate over all rows that contain some data. A call to
41
- `Worksheet.each` without arguments will omit empty rows at the beginning of the
42
- worksheet:
43
-
44
- ```ruby
45
- sheet1.each do |row|
46
- # do something interesting with a row
47
- end
48
- ```
49
-
50
- Or you can tell a worksheet how many rows should be omitted at the beginning.
51
- The following starts at the 3rd row, regardless of whether or not it or the
52
- preceding rows contain any data:
53
-
54
- ```ruby
55
- sheet2.each 2 do |row|
56
- # do something interesting with a row
57
- end
58
- ```
59
-
60
- Or you can access rows directly, by their index (0-based):
61
-
62
- ```ruby
63
- row = sheet1.row(3)
64
- ```
65
-
66
- To access the values stored in a row, treat the row like an array.
67
-
68
- ```ruby
69
- row[0]
70
- ```
71
-
72
- This will return a `String`, a `Float`, an `Integer`, a `Formula`, a `Link` or a `Date`
73
- or `DateTime` object - or `nil` if the cell is empty.
74
-
75
- More information about the formatting of a cell can be found in the format
76
- with the equivalent index:
77
-
78
- ```ruby
79
- row.format 2
80
- ```
81
-
82
- ## Writing is easy
83
- As before, make sure you have Spreadsheet required and the client_encoding
84
- set. Then make a new Workbook:
85
-
86
- ```ruby
87
- book = Spreadsheet::Workbook.new
88
- ```
89
-
90
- Add a Worksheet and you're good to go:
91
-
92
- ```ruby
93
- sheet1 = book.create_worksheet
94
- ```
95
-
96
- This will create a Worksheet with the Name "Worksheet1". If you prefer another
97
- name, you may do either of the following:
98
-
99
- ```ruby
100
- sheet2 = book.create_worksheet :name => 'My Second Worksheet'
101
- sheet1.name = 'My First Worksheet'
102
- ```
103
-
104
- Now, add data to the Worksheet, using either Worksheet#[]=,
105
- Worksheet#update_row, or work directly on Row using any of the Array-Methods
106
- that modify an Array in place:
107
-
108
- ```ruby
109
- sheet1.row(0).concat %w{Name Country Acknowlegement}
110
- sheet1[1,0] = 'Japan'
111
- row = sheet1.row(1)
112
- row.push 'Creator of Ruby'
113
- row.unshift 'Yukihiro Matsumoto'
114
- sheet1.row(2).replace [ 'Daniel J. Berger', 'U.S.A.',
115
- 'Author of original code for Spreadsheet::Excel' ]
116
- sheet1.row(3).push 'Charles Lowe', 'Author of the ruby-ole Library'
117
- sheet1.row(3).insert 1, 'Unknown'
118
- sheet1.update_row 4, 'Hannes Wyss', 'Switzerland', 'Author'
119
- ```
120
-
121
- Add some Formatting for flavour:
122
-
123
- ```ruby
124
- sheet1.row(0).height = 18
125
-
126
- format = Spreadsheet::Format.new :color => :blue,
127
- :weight => :bold,
128
- :size => 18
129
- sheet1.row(0).default_format = format
130
-
131
- bold = Spreadsheet::Format.new :weight => :bold
132
- 4.times do |x| sheet1.row(x + 1).set_format(0, bold) end
133
- ```
134
-
135
- And finally, write the Excel File:
136
-
137
- ```ruby
138
- book.write '/path/to/output/excel-file.xls'
139
- ```
140
-
141
- ## Modifying an existing Document
142
-
143
- Spreadsheet has some limited support for modifying an existing Document. This
144
- is done by copying verbatim those parts of an Excel-document which Spreadsheet
145
- can't modify (yet), recalculating relevant offsets, and writing the data that
146
- can be changed.
147
- Here's what should work:
148
-
149
- * Adding, changing and deleting cells.
150
- * You should be able to fill in Data to be evaluated by predefined Formulas
151
-
152
- Limitations:
153
-
154
- * Spreadsheet can only write BIFF8 (Excel97 and higher). The results of
155
- modifying an earlier version of Excel are undefined.
156
- * Spreadsheet does not modify Formatting at present. That means in particular
157
- that if you set the Value of a Cell to a Date, it can only be read as a
158
- Date if its Format was set correctly prior to the change.
159
- * Although it is theoretically possible, it is not recommended to write the
160
- resulting Document back to the same File/IO that it was read from.
161
-
162
- And here's how it works:
163
-
164
- ```ruby
165
- book = Spreadsheet.open '/path/to/an/excel-file.xls'
166
- sheet = book.worksheet 0
167
- sheet.each do |row|
168
- row[0] *= 2
169
- end
170
- book.write '/path/to/output/excel-file.xls'
171
- ```
172
-
173
- Or you can directly access the cell that you want and add your text on it:
174
-
175
- ```ruby
176
- sheet.rows[2][1] = "X"
177
- ```
178
-
179
- ## Date and DateTime
180
- Excel does not know a separate Datatype for Dates. Instead it encodes Dates
181
- into standard floating-point numbers and recognizes a Date-Cell by its
182
- formatting-string:
183
-
184
- ```ruby
185
- row.format(3).number_format
186
- ```
187
-
188
- Whenever a Cell's Format describes a Date or Time, Spreadsheet will give you
189
- the decoded Date or DateTime value. Should you need to access the underlying
190
- Float, you may do the following:
191
-
192
- ```ruby
193
- row.at(3)
194
- ```
195
-
196
- If for some reason the Date-recognition fails, you may force Date-decoding:
197
-
198
- ```ruby
199
- row.date(3)
200
- row.datetime(3)
201
- ```
202
-
203
- When you set the value of a Cell to a Date, Time or DateTime, Spreadsheet will
204
- try to set the cell's number-format to a corresponding value (one of Excel's
205
- builtin formats). If you have already defined a Date- or DateTime-format,
206
- Spreadsheet will use that instead. If a format has already been applied to
207
- a particular Cell, Spreadsheet will leave it untouched:
208
-
209
- ```ruby
210
- row[4] = Date.new 1975, 8, 21
211
- # -> assigns the builtin Date-Format: 'M/D/YY'
212
- book.add_format Format.new(:number_format => 'DD.MM.YYYY hh:mm:ss')
213
- row[5] = DateTime.new 2008, 10, 12, 11, 59
214
- # -> assigns the added DateTime-Format: 'DD.MM.YYYY hh:mm:ss'
215
- row.set_format 6, Format.new(:number_format => 'D-MMM-YYYY')
216
- row[6] = Time.new 2008, 10, 12
217
- # -> the Format of cell 6 is left unchanged.
218
- ```
219
-
220
- ## Outline (Grouping) and Hiding
221
- Spreadsheet supports outline (grouping) and hiding functions from version
222
- 0.6.5. In order to hide rows or columns, you can use 'hidden' property.
223
- As for outline, 'outline_level' property is also available. You can use
224
- both 'hidden' and 'outline_level' at the same time.
225
-
226
- You can create a new file with outline and hiding rows and columns as
227
- follows:
228
-
229
- ```ruby
230
- require 'spreadsheet'
231
-
232
- # create a new book and sheet
233
- book = Spreadsheet::Workbook.new
234
- sheet = book.create_worksheet
235
- 5.times {|j| 5.times {|i| sheet[j,i] = (i+1)*10**j}}
236
-
237
- # column
238
- sheet.column(2).hidden = true
239
- sheet.column(3).hidden = true
240
- sheet.column(2).outline_level = 1
241
- sheet.column(3).outline_level = 1
242
-
243
- # row
244
- sheet.row(2).hidden = true
245
- sheet.row(3).hidden = true
246
- sheet.row(2).outline_level = 1
247
- sheet.row(3).outline_level = 1
248
-
249
- # save file
250
- book.write 'out.xls'
251
- ```
252
-
253
- Also you can read an existing file and change the hidden and outline
254
- properties. Here is the example below:
255
-
256
- ```ruby
257
- require 'spreadsheet'
258
-
259
- # read an existing file
260
- file = ARGV[0]
261
- book = Spreadsheet.open(file, 'rb')
262
- sheet= book.worksheet(0)
263
-
264
- # column
265
- sheet.column(2).hidden = true
266
- sheet.column(3).hidden = true
267
- sheet.column(2).outline_level = 1
268
- sheet.column(3).outline_level = 1
269
-
270
- # row
271
- sheet.row(2).hidden = true
272
- sheet.row(3).hidden = true
273
- sheet.row(2).outline_level = 1
274
- sheet.row(3).outline_level = 1
275
-
276
- # save file
277
- book.write "out.xls"
278
- ```
279
-
280
- Notes
281
- * The outline_level should be under 8, which is due to the Excel data format.
282
-
283
- ## Allow access to rendered output instead of just writing a file
284
-
285
- ```ruby
286
- file_contents = StringIO.new
287
- book.write file_contents # => Now file_contents contains the rendered file output
288
- ```
289
-
290
- Also see: https://github.com/zdavatz/spreadsheet/issues/125#issuecomment-75541041
291
-
292
- ## More about Encodings
293
- Spreadsheet assumes it's running on Ruby 1.8 with Iconv-support. It is your
294
- responsibility to handle Conversion Errors, or to prevent them e.g. by using
295
- the Iconv Transliteration and Ignore flags:
296
- Spreadsheet.client_encoding = 'LATIN1//TRANSLIT//IGNORE'
297
-
298
- ## Page setup (for printing)
299
-
300
- ```ruby
301
- sheet.pagesetup[:orientation] = :landscape # or :portrait (default)
302
- sheet.pagesetup[:adjust_to] = 85 # default 100
303
- ```
304
-
305
- ## Backward Compatibility
306
- Spreadsheet is designed to be a drop-in replacement for both ParseExcel and
307
- Spreadsheet::Excel. It provides a number of require-paths for backward
308
- compatibility with its predecessors. If you have been working with ParseExcel,
309
- you have probably used one or more of the following:
310
-
311
- ```ruby
312
- require 'parseexcel'
313
- require 'parseexcel/parseexcel'
314
- require 'parseexcel/parser'
315
- ```
316
-
317
- Either of the above will define the ParseExcel.parse method as a facade to
318
- Spreadsheet.open. Additionally, this will alter Spreadsheets behavior to define
319
- the ParseExcel::Worksheet::Cell class and fill each parsed Row with instances
320
- thereof, which in turn provide ParseExcel's Cell#to_s(encoding) and Cell#date
321
- methods.
322
- You will have to manually uninstall the parseexcel library.
323
-
324
- If you are upgrading from Spreadsheet::Excel, you were probably using
325
- Workbook#add_worksheet and Worksheet#write, write_row or write_column.
326
- Use the following to load the code which provides them:
327
-
328
- ```ruby
329
- require 'spreadsheet/excel'
330
- ```
331
-
332
- Again, you will have to manually uninstall the spreadsheet-excel library.
333
-
334
- If you perform fancy formatting, you may run into trouble as the
335
- Format implementation has changed considerably. If that is the case, please
336
- drop me a line at "zdavatz at ywesee dot com" and I will try to help you. Don't
337
- forget to include the offending code-snippet!
338
-
339
- All compatibility code is deprecated and will be removed in version 1.0.0
data/Gemfile DELETED
@@ -1,21 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- if ENV['USE_LATEST_RUBY_OLE']
4
- if Dir.exist?('../ruby-ole')
5
- gem 'ruby-ole', :path => '../ruby-ole'
6
- else
7
- gem 'ruby-ole',
8
- :git => 'https://github.com/taichi-ishitani/ruby-ole.git',
9
- :branch => 'support_frozen_string_literal'
10
- end
11
- else
12
- gem 'ruby-ole'
13
- end
14
-
15
- if RUBY_VERSION.to_f > 2.0
16
- gem 'test-unit'
17
- gem 'minitest'
18
- end
19
- group :development do
20
- gem 'hoe', '>= 3.4'
21
- end
@@ -1,23 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- hoe (3.17.1)
5
- rake (>= 0.8, < 13.0)
6
- minitest (5.10.1)
7
- power_assert (1.0.1)
8
- rake (12.3.0)
9
- ruby-ole (1.2.12.1)
10
- test-unit (3.2.3)
11
- power_assert
12
-
13
- PLATFORMS
14
- ruby
15
-
16
- DEPENDENCIES
17
- hoe (>= 3.4)
18
- minitest
19
- ruby-ole
20
- test-unit
21
-
22
- BUNDLED WITH
23
- 1.14.6
data/History.md DELETED
@@ -1,824 +0,0 @@
1
- ### 1.2.2 01.03.2019
2
- Author: taichi <taichi730@gmail.com>
3
- Date: Fri Mar 1 13:00:28 2019 +0900
4
-
5
- * fixed unit test errors caused by frozen-string-literal
6
- * removed ruby 2.3.8 with frozen-string-literal from CI regression
7
- (It seems that standard libraries for this version does not support the
8
- feature enough.)
9
- * enable '--enable-frozen-string-literal' option on CI test
10
-
11
- ### 1.2.1 28.02.2019
12
- Author: taichi <taichi730@gmail.com>
13
- Date: Thu Feb 28 10:30:46 2019 +0900
14
-
15
- * Merge pull request #231 from taichi-ishitani/separated_version_file
16
- * Merge pull request #230 from taichi-ishitani/frozen_string_literal_support
17
-
18
- ### 1.2.0 17.2.2019
19
- Author: James McLaren <jamesmclaren555@gmail.com>
20
- * spreadsheet-1.2.0.gem released
21
-
22
- ### 1.1.9 26.1.2019
23
- Author: Nick Weiland <nickweiland@gmail.com>
24
- * spreadsheet-1.1.9.gem released.
25
-
26
- ### 1.1.8 / 20.08.2018
27
- Author: VitaliyAdamkov <adamkov@tex.ua>
28
- Date: Mon Aug 20 09:48:31 2018 +0300
29
-
30
- * Cancel :lazy usage
31
- * Use lazy select to speed up a little
32
- * Omit rails :try usage
33
- * stub for :postread_worksheet method
34
- * sometimes it selects empty array..
35
-
36
- Author: 545ch4 <s@rprojekt.org>
37
- Date: Wed Mar 28 15:33:04 2018 +0200
38
-
39
- * [ruby-2.4] Fix weird first line of spreadsheet.gemspec
40
- * Doesn't seem to be a valid .gemspec command/field.
41
-
42
- ### 1.1.7 / 15.03.2018
43
-
44
- Author: Maarten Brouwers <github@murb.nl>
45
- Date: Thu Mar 15 15:10:23 2018 +0100
46
-
47
- * shadowing outer local variable - i
48
-
49
- * Running rake resulted in the following warning: `lib/spreadsheet/worksheet.rb:345: warning: shadowing outer local variable - i`; this patch fixes that.
50
-
51
- ### 1.1.6 / 12.03.2018
52
-
53
- Author: Todd Hambley <thambley@travelleaders.com>
54
- Date: Mon Mar 12 14:20:39 2018 -0400
55
-
56
- * fix reject for ruby 1.8.7
57
- * fix using invalid code pages when writing workbook
58
-
59
- ### 1.1.5 / 20.11.2017
60
-
61
- Author: Paco Guzmán <pacoguzman@users.noreply.github.com>
62
- Date: Sun Nov 19 18:10:57 2017 +0100
63
-
64
- * Avoid creating a class variable, that variable cannot be garbage collected and it retains a lot of memory
65
-
66
- ### 1.1.4 / 02.12.2016
67
-
68
- Author: Richard Lee <dlackty@gmail.com>
69
- Date: Mon Jan 16 03:52:42 2017 +0800
70
-
71
- * Update Travis CI rubies
72
-
73
- Author: Zeno R.R. Davatz <zdavatz@ywesee.com>
74
- Date: Fri Dec 2 10:36:20 2016 +0100
75
-
76
- * updated Gem to use the correct License on Rubygems to GPL-3.0 as stated in the LICENSE File.
77
-
78
- ### 1.1.3 / 06.08.2016
79
-
80
- Author: Alexandre Balon-Perin <abalonperin@gilt.jp>
81
- Date: Fri Aug 5 17:19:29 2016 +0900
82
-
83
- * Fix issue with iconv on Ubuntu 12.04
84
- * This fix is related to a bug in the iconv implementation packaged in libc6 on Ubuntu 12.04
85
- * For some reasons, the encoding options //TRANSLIT//IGNORE are improperly applied.
86
- * When //TRANSLIT is specified, instead of rescuing errors related to //TRANSLIT and checking if the //IGNORE is set, the code simply crashes.
87
-
88
- ### 1.1.2 / 29.03.2016
89
-
90
- Author: Aleksandr Boykov <aleksandr.boykov@parelio.com>
91
- Date: Mon Mar 28 14:07:35 2016 -0400
92
-
93
- fixes compact! method when the excel document has dates
94
-
95
- ### 1.1.1 / 03.01.2016
96
-
97
- Author: ChouAndy <chouandy@ecoworkinc.com>
98
- Date: Sun Jan 3 17:26:18 2016 +0800
99
-
100
- Fixed Unknown Codepage 0x5212
101
-
102
- ### 1.1.0 / 08.12.2015
103
-
104
- Author: Matthew Boeh <matt@crowdcompass.com>
105
- Date: Mon Dec 7 11:18:55 2015 -0800
106
-
107
- * Disregard locale indicators when determining whether a cell contains a date/time.
108
-
109
- ### 1.0.9 / 18.11.2015
110
-
111
- Author: 545ch4 <s@rprojekt.org>
112
- Date: Mon Nov 16 10:26:27 2015 +0100
113
-
114
- * Add smart method compact! to worksheet
115
- * Use compact! to reduce the number of rows and columns by striping empty one at both ends.
116
-
117
- ### 1.0.8 / 20.10.2015
118
-
119
- commit e9bd1dd34998803b63460f4951e9aa34e569bd8f
120
- Author: Pierre Laprée <pilap82@users.noreply.github.com>
121
- Date: Tue Oct 20 03:12:22 2015 +0200
122
-
123
- * Remove stray `puts`
124
- * A `puts` instruction pollutes the log and doesn't serve any purpose. As such, we propose its removal.
125
-
126
- ### 1.0.7 / 23.09.2015
127
-
128
- Author: Leopoldo Lee Agdeppa III <leopoldo.agdeppa@gmail.com>
129
- Date: Wed Sep 23 08:24:16 2015 +0800
130
-
131
- * Update worksheet.rb
132
- * Adding Test for Freeze panels
133
- * Update worksheet.rb
134
- * Added freeze (freeze panel) functionality
135
- * Update worksheet.rb
136
- * Freeze (freeze window) functionality added to worksheet
137
-
138
- ### 1.0.6 / 14.09.2015
139
-
140
- Author: Yann Plancqueel <yplancqueel@gmail.com>
141
- Date: Sat Sep 12 15:32:49 2015 +0200
142
-
143
- * bugfix opening a spreadsheet with missing format
144
-
145
- ### 1.0.5 / 01.09.2015
146
-
147
- Author: kunashir <kunashir@list.ru>
148
- Date: Tue Sep 1 13:12:49 2015 +0300
149
-
150
- * add format for nubmer with out #
151
-
152
- ### 1.0.4 / 18.07.2015
153
-
154
- Author: Edmund Mai <edmundm@crowdtap.com>
155
- Date: Fri Jul 17 15:32:47 2015 -0400
156
-
157
- * Fixes slow Spreadsheet.open response in console
158
-
159
- ### 1.0.3 / 10.03.2015
160
-
161
- Author: Robert Eshleman <c.robert.eshleman@gmail.com>
162
- Date: Mon Mar 9 09:47:59 2015 -0400
163
-
164
- * Update `ruby-ole` to `1.2.11.8`
165
- ** `ruby-ole` <= `1.2.11.7` throws a duplicated key warning in Ruby 2.2.
166
- ** This commit updates `ruby-ole` to `1.2.11.8`, which fixes this warning.
167
- ** Related discussion: [aquasync/ruby-ole#15] - [aquasync/ruby-ole#15]: https://github.com/aquasync/ruby-ole/issues/15
168
-
169
- ### 1.0.2 / 05.03.2015
170
-
171
- Author: cantin <cantin2010@gmail.com>
172
- Date: Thu Mar 5 16:13:59 2015 +0800
173
-
174
- * add Rational support
175
- * add rational requirement
176
- * use old rational syntax in test
177
-
178
- ### 1.0.1 / 22.01.2015
179
-
180
- Author: Sergey Konotopov <lalalalalala@gmail.com>
181
- Date: Wed Jan 21 13:19:56 2015 +0300
182
-
183
- * Fixing Excel::Worksheet#dimensions
184
-
185
- ### 1.0.0 / 29.08.2014
186
-
187
- * added spreadsheet/errors.rb to Manifest.txt
188
-
189
- ### 0.9.9 / 28.08.2014
190
-
191
- Author: PikachuEXE <pikachuexe@gmail.com>
192
- Date: Wed Aug 27 09:55:41 2014 +0800
193
-
194
- * Add custom error classes
195
- * Raise custom error for unknown code page or unsupported encoding
196
-
197
- ### 0.9.8 / 19.08.2014
198
-
199
- Author: PikachuEXE <pikachuexe@gmail.com>
200
- Date: Tue Aug 19 09:54:30 2014 +0800
201
-
202
- * Fix Encoding for MRI 2.1.0
203
-
204
- ### 0.9.7 / 04.02.2014
205
-
206
- * Avoid exception when reading text objects
207
- * Add test for drawings with text (currenty broken)
208
- * Restore xlsopcodes script which had been mangled in previous commits
209
- * Remove ruby 1.9 from roadmap, it's already working fine
210
- * Fix excel file format documentation which had been mangled in previous commits
211
-
212
- ### 0.9.6 / 02.12.2013
213
-
214
- Author: Malcolm Blyth <trashbat@co.ck>
215
- Date: Mon Dec 2 11:44:25 2013 +0000
216
-
217
- * Fixed issue whereby object author being null caused a gross failure.
218
- * Now returns object author as an empty string
219
-
220
- ### 0.9.5 / 20.11.2013
221
-
222
- Author: Malcolm Blyth <trashbat@co.ck>
223
- Date: Tue Nov 19 15:14:31 2013 +0000
224
-
225
- * Bumped revision
226
- * Fixed author stringname error (damn this 1 based counting)
227
- * Updating integration test to check for comments contained within the cells.
228
- * Checking also for multiple comments in a sheet
229
-
230
- ### 0.9.4 / 12.11.2013
231
-
232
- * Updated Manifest.txt
233
-
234
- ### 0.9.3 / 12.11.2013
235
-
236
- commit e15d8b45d7587f7ab78c7b7768de720de9961341 (refs/remotes/gguerrero/master)
237
- Author: Guillermo Guerrero <g.guerrero.bus@gmail.com>
238
- Date: Tue Nov 12 11:50:30 2013 +0100
239
-
240
- * Refactor update_format for cloning format objects
241
- * Added lib/spreadsheet/note.rb to Manifest.txt file
242
- * 'update_format' methods now receive a hash of key => values to update
243
-
244
- Author: Przemysław Ciąćka <przemyslaw.ciacka@gmail.com>
245
- Date: Tue Nov 12 00:07:57 2013 +0100
246
-
247
- * Added lib/spreadsheet/note.rb to Manifest.txt file
248
-
249
- ### 0.9.2 / 11.11.2013
250
-
251
- commit e70dc0dbbc966ce312b45b0d44d0c3b1dc10aad6
252
- Author: Malcolm Blyth <trashbat@co.ck>
253
- Date: Mon Nov 11 15:53:58 2013 +0000
254
-
255
- *Corrected compressed string formatting - *U (UTF-8) should have been *S (16-bit string)
256
- *Completed addition of notes hash to worksheet
257
- *Bumped revision
258
- *Updated reader and note
259
- Note class no longer extends string for simplicity and debug of class (pp now works a bit more easily)
260
- Reader has had loads of changes (still WIP) to allow objects of class
261
- Note and NoteObject to be created and combined in the postread_worksheet function
262
- *Adding noteObject to deal with the Object (and ultimately text comment field) created by excel's madness
263
-
264
- ### 0.9.1 / 24.10.2013
265
-
266
- * Author: Matti Lehtonen <matti.lehtonen@puujaa.com>
267
- Date: Thu Oct 24 09:41:50 2013 +0300
268
-
269
- * Add support for worksheet visibility
270
-
271
- ### 0.9.0 / 16.09.2013
272
-
273
- * Author: Pavel <pavel.evst@gmail.com>
274
- Date: Mon Sep 16 14:02:49 2013 +0700
275
-
276
- * Test cases for Worksheet#margins, Worksheet#pagesetup, Workbook#delete_worksheet. Fix bugs related to it.
277
- * Page margins reader/writter
278
- * Markdownify GUIDE
279
- * Add page setup options (landscape or portrait and adjust_to)
280
-
281
- ### 0.8.9 / 24.08.2013
282
-
283
- Author: Doug Renn <renn@nestegg.com>
284
- Date: Fri Aug 23 17:10:24 2013 -0600
285
-
286
- * Work around to handle number formats that are being mistaken time formats
287
-
288
- ### 0.8.8 / 02.08.2013
289
-
290
- Author: Nathan Colgate <nathancolgate@gmail.com>
291
- Date: Thu Aug 1 15:01:57 2013 -0500
292
-
293
- * Update excel/internals.rb to reference a valid Encoding type
294
- * Encoding.find("MACINTOSH") was throwing an error. Encoding.find("MACROMAN") does not.
295
-
296
- ### 0.8.7 / 24.07.2013
297
-
298
- Author: Yasuhiro Asaka <yasaka@ywesee.com>
299
- Date: Wed Jul 24 11:31:12 2013 +0900
300
-
301
- * Remove warnings for test suite
302
- * warning: mismatched indentations at 'end' with 'class' at xxx
303
- * warning: method redefined; discarding old xxx
304
- * warning: assigned but unused variable xxx
305
- * warning: previous definition of xxx was here
306
- * The source :rubygems is deprecated because HTTP
307
- * requests are insecure. (Gemfile)
308
-
309
- ### 0.8.6 / 11.07.2013
310
-
311
- Author: Arjun Anand and Robert Stern <dev+arjuna+rstern@reenhanced.com>
312
- Date: Wed Jul 10 13:45:30 2013 -0400
313
-
314
- * Allow editing of an existing worksheet.
315
-
316
- ### 0.8.5 / 24.04.2013
317
-
318
- * Applied Patch by Joao Almeida: When editing an existing sheet, cells merge was not working.
319
- * https://github.com/voraz/spreadsheet/pull/14.patch
320
-
321
- ### 0.8.4 / 20.04.2013
322
-
323
- * Applied Patch by boss@airbladesoftware.com
324
- * https://groups.google.com/d/msg/rubyspreadsheet/73IoEwSx69w/barE7uVnIzwJ
325
-
326
- ### 0.8.3 / 12.03.2013
327
-
328
- Author: Keith Walsh <keith.walsh@adtegrity.com>
329
- Date: Mon Mar 11 16:48:25 2013 -0400
330
-
331
- * Typo correction in guide example.
332
-
333
- ### 0.8.2 / 28.02.2013
334
-
335
- Author: Roque Pinel <roque.pinel@infotechfl.com>
336
- Date: Wed Feb 27 12:10:29 2013 -0500
337
-
338
- * Requiring BigDecimal for checking.
339
- * Made API friendly to BigDecimal precision.
340
- * Changes introduced by the user 'valeriusjames'.
341
-
342
- ### 0.8.1 / 18.02.2013
343
-
344
- * Updated Manifest.txt to include lib/spreadsheet/excel/rgb.rb
345
-
346
- ### 0.8.0 / 18.02.2013
347
-
348
- * Adding support for converting color palette values to RGB values (not vice-versa..yet)
349
- * by https://github.com/dancaugherty/spreadsheet/compare/master...rgb
350
-
351
- ### 0.7.9 / 06.02.2013
352
-
353
- Author: Eugeniy Belyaev (zhekanax)
354
-
355
- * You can merge if you are interested in perl-like Workbook.set_custom_color
356
- implementation. I know it is not really a proper way to deal with custom colors, but
357
- nevertheless it makes it possible.
358
- * https://github.com/zdavatz/spreadsheet/pull/27
359
-
360
- ### 0.7.8 / 06.02.2013
361
-
362
- Author: Kenichi Kamiya <kachick1@gmail.com>
363
- Date: Wed Feb 6 11:23:35 2013 +0900
364
-
365
- * Link to Travis CI on README
366
- * Remove warnings "assigned but unused variable" in test
367
- * Remove warnings "assigned but unused variable"
368
- * Enable $VERBOSE flag when running test
369
-
370
- ### 0.7.7 / 22.01.2013
371
-
372
- Author: DeTeam <timur.deteam@gmail.com>
373
- Date: Tue Jan 22 19:11:52 2013 +0400
374
-
375
- * Make tests pass
376
- * Readme updated
377
- * RuntimeError when file is empty
378
- * Hoe in dev deps
379
- * Finish with bundler
380
- * Add a Gemfile
381
-
382
- also see: https://github.com/zdavatz/spreadsheet/pull/24
383
-
384
- ### 0.7.6 / 15.01.2013
385
-
386
- Author: Kenichi Kamiya <kachick1@gmail.com>
387
- Date: Tue Jan 15 15:52:58 2013 +0900
388
-
389
- * Remove warnings "method redefined; discarding old default_format"
390
- * Remove warnings "`*' interpreted as argument prefix"
391
- * Remove warnings "instance variable @{ivar} not initialized"
392
- * Remove warnings "assigned but unused variable"
393
-
394
- also see: https://github.com/zdavatz/spreadsheet/pull/21
395
-
396
- ### 0.7.5 / 06.12.2012
397
-
398
- * Add error tolerant values for Iconv when writing spreadsheet
399
- * by andrea@spaghetticode.it
400
-
401
- ### 0.7.4 / 06.10.2012
402
-
403
- * Adds Spreadsheet::Excel::Row#to_a method to properly decode Date and DateTime data.
404
- * patches by https://github.com/mdgreenfield/spreadsheet
405
-
406
- ### 0.7.3 / 26.06.2012
407
-
408
- * Fix Format borders
409
- * see https://github.com/zdavatz/spreadsheet/pull/6 for full details.
410
- * patches by uraki66@gmail.com
411
-
412
- ### 0.7.2 / 14.06.2012
413
-
414
- * many changes by Mina Naguib <mina.git@naguib.ca>
415
- * see git log for full details
416
-
417
- ### 0.7.1 / 08.05.2012
418
-
419
- * Author: Artem Ignatiev <zazubrik@gmail.com>
420
- * remove require and rake altogether
421
- * gem build and rake gem both work fine without those requires,
422
- * and requiring 'rake' broke bundler
423
- * add rake as development dependency
424
- * Somehow it broken rake on my other project
425
-
426
- ### 0.7.0 / 07.05.2012
427
-
428
- * Author: Artem Ignatiev <zazubrik@gmail.com>
429
- * use both ruby 1.8 and 1.9 compatible way of getting character code when hashing
430
- * Fix syntax for ruby-1.9
431
- * return gemspec so that bundler can find it
432
- When bundler loads gemspec, it evaluates it, and if the return value is
433
- not a gem specification built, refuses to load the gem.
434
- * Testing worksheet protection
435
-
436
- ### 0.6.9 / 28.04.2012
437
-
438
- * Yield is more simple here too.
439
- * No need to capture the block in Spreadsheet.open
440
- * Rather than extending a core class, let's just use #rcompact from a helper module
441
-
442
- ### 0.6.8 / 20.01.2012
443
-
444
- * adds the fix to allow the writing of empty rows, by ClemensP.
445
- * Test also by ClemensP.
446
-
447
- ### 0.6.7 / 18.01.2012
448
-
449
- * http://dev.ywesee.com/wiki.php/Gem/Spreadsheet points point 2.
450
- * Tests by Michal
451
- * Patches by Timon
452
-
453
- ### 0.6.6 / 18.01.2012
454
-
455
- * http://dev.ywesee.com/wiki.php/Gem/Spreadsheet points 8 and 9.
456
- * Fixes byjsaak@napalm.hu
457
- * Patches by Vitaly Klimov
458
-
459
- ### 0.6.5.9 / 7.9.2011
460
-
461
- * Fixed a frozen string bug thanks to dblock (Daniel Doubrovkine),
462
- * dblock@dblock.org
463
-
464
- * https://github.com/dblock/spreadsheet/commit/164dcfbb24097728f1a7453702c270107e725b7c
465
-
466
- ### 0.6.5.8 / 30.8.2011
467
-
468
- * This patch is about adding a sheet_count method to workbook so that it returns
469
- * the total no of worksheets for easy access. Please check. By
470
- * tamizhgeek@gmail.com
471
-
472
- * https://gist.github.com/1180625
473
-
474
- ### 0.6.5.7 / 20.7.2011
475
-
476
- * Fixed the bug introduced by Roel van der Hoorn and updated the test cases.
477
-
478
- * https://github.com/vanderhoorn/spreadsheet/commit/c79ab14dcf40dee1d6d5ad2b174f3fe31414ca28
479
-
480
- ### 0.6.5.6 / 20.7.2011
481
-
482
- * Added a fix from Roel van der Hoorn to sanitize_worksheets if 'sheets' is empty.
483
-
484
- * https://github.com/vanderhoorn/spreadsheet/commit/c109f2ac5486f9a38a6d93267daf560ab4b9473e
485
-
486
- ### 0.6.5.5 / 24.6.2011
487
-
488
- * updated the color code for orange to 0x0034 => :orange, thanks to the hint of Jonty
489
-
490
- * https://gist.github.com/1044700
491
-
492
- ### 0.6.5.4 / 18.4.2011
493
-
494
- * Updated worksheet.rb according to the Patch of Björn Andersson.
495
-
496
- * https://gist.github.com/925007#file_test.patch
497
- * http://url.ba/09p9
498
-
499
- ### 0.6.5.3 / 23.3.2011
500
-
501
- * Updated Txt lib/spreadsheet/excel/writer/biff8.rb with a Patch from Alexandre Bini
502
-
503
- * See this for full detail: http://url.ba/6r1z
504
-
505
- ### 0.6.5.2 / 14.2.2011
506
-
507
- * Updated test/integration.rb to work with Ruby ruby 1.9.2p136 (2010-12-25 revision 30365) [i686-linux]
508
-
509
- * Thanks for the hint tomiacannondale@gmail.com
510
-
511
- ### 0.6.5.1 / 17.1.2011
512
-
513
- * One enhancement thanks to Qiong Peng, Moo Yu, and Thierry Thelliez
514
-
515
- * http://dev.ywesee.com/wiki.php/Gem/Spreadsheet
516
-
517
- ### 0.6.5 / 07.12.2010
518
-
519
- * 2 Enhancements courtesy to ISS AG.
520
-
521
- * Outlining (Grouping) of lines and columns is now possible. The outlining
522
- maximum is 8. This means you can do 8 subgroups in a group.
523
-
524
- * Hiding and Unhiding of lines and columns is now possible.
525
-
526
- * Both of above two points is now possible by creating a new Excel File from
527
- scratch or editing an existing XLS and adding groups or hiding lines to it.
528
-
529
- ### 0.6.4.1 / 2009-09-17
530
-
531
- * 3 Bugfixes
532
-
533
- * Fixes the issue reported by Thomas Preymesser and tracked down most of the
534
- way by Hugh McGowan in
535
- http://rubyforge.org/tracker/index.php?func=detail&aid=26647&group_id=678&atid=2677
536
- where reading the value of the first occurrence of a shared formula
537
- failed.
538
-
539
- * Fixes the issue reported by Anonymous in
540
- http://rubyforge.org/tracker/index.php?func=detail&aid=26546&group_id=678&atid=2677
541
- where InvalidDate was raised for some Dates.
542
-
543
- * Fixes the issue reported by John Lee in
544
- http://rubyforge.org/tracker/index.php?func=detail&aid=27110&group_id=678&atid=2677
545
- which is probably a duplicate of the Bug previously reported by Kadvin XJ in
546
- http://rubyforge.org/tracker/index.php?func=detail&aid=26182&group_id=678&atid=2677
547
- where unchanged rows were marked as changed in the Excel-Writer while the
548
- File was being written, triggering an Error.
549
-
550
- * 1 minor enhancement
551
-
552
- * Detect row offsets from Cell data if Row-Ops are missing
553
- This fixes a bug reported by Alexander Logvinov in
554
- http://rubyforge.org/tracker/index.php?func=detail&aid=26513&group_id=678&atid=2677
555
-
556
-
557
- ### 0.6.4 / 2009-07-03
558
-
559
- * 5 Bugfixes
560
-
561
- * Fixes the issue reported by Harley Mackenzie in
562
- http://rubyforge.org/tracker/index.php?func=detail&aid=24119&group_id=678&atid=2677
563
- where in some edge-cases numbers were stored incorrectly
564
-
565
- * Fixes the issue reported and fixed by someone23 in
566
- http://rubyforge.org/tracker/index.php?func=detail&aid=25732&group_id=678&atid=2677
567
- where using Row-updater methods with blocks caused LocalJumpErrors
568
-
569
- * Fixes the issue reported and fixed by Corey Burrows in
570
- http://rubyforge.org/tracker/index.php?func=detail&aid=25784&group_id=678&atid=2677
571
- where "Setting the height of a row, either in Excel directly, or via the
572
- Spreadsheet::Row#height= method results in a row that Excel displays with
573
- the maximum row height (409)."
574
-
575
- * Fixes the issue reported by Don Park in
576
- http://rubyforge.org/tracker/index.php?func=detail&aid=25968&group_id=678&atid=2677
577
- where some Workbooks could not be parsed due to the OLE-entry being all
578
- uppercase
579
-
580
- * Fixes the issue reported by Iwan Buetti in
581
- http://rubyforge.org/tracker/index.php?func=detail&aid=24414&group_id=678&atid=2677
582
- where parsing some Workbooks failed with an Invalid date error.
583
-
584
-
585
- * 1 major enhancement
586
-
587
- * Spreadsheet now runs on Ruby 1.9
588
-
589
- ### 0.6.3.1 / 2009-02-13
590
-
591
- * 3 Bugfixes
592
-
593
- * Only selects the First Worksheet by default
594
- This deals with an issue reported by Biörn Andersson in
595
- http://rubyforge.org/tracker/?func=detail&atid=2677&aid=23736&group_id=678
596
- where data-edits in OpenOffice were propagated through all selected
597
- sheets.
598
-
599
- * Honors Row, Column, Worksheet and Workbook-formats
600
- and thus fixes a Bug introduced in
601
- http://scm.ywesee.com/?p=spreadsheet;a=commit;h=52755ad76fdda151564b689107ca2fbb80af3b78
602
- and reported in
603
- http://rubyforge.org/tracker/index.php?func=detail&aid=23875&group_id=678&atid=2678
604
- and by Joachim Schneider in
605
- http://rubyforge.org/forum/forum.php?thread_id=31056&forum_id=2920
606
-
607
- * Fixes a bug reported by Alexander Skwar in
608
- http://rubyforge.org/forum/forum.php?thread_id=31403&forum_id=2920
609
- where the user-defined formatting of Dates and Times was overwritten with
610
- a default format, and other issues connected with writing Dates and Times
611
- into Spreadsheets.
612
-
613
- * 1 minor enhancements
614
-
615
- * Spreadsheet shold now be completely warning-free,
616
- as requested by Eric Peterson in
617
- http://rubyforge.org/forum/forum.php?thread_id=31346&forum_id=2920
618
-
619
- ### 0.6.3 / 2009-01-14
620
-
621
- * 1 Bugfix
622
-
623
- * Fixes the issue reported by Corey Martella in
624
- http://rubyforge.org/forum/message.php?msg_id=63651
625
- as well as other issues engendered by the decision to always shorten
626
- Rows to the last non-nil value.
627
-
628
- * 2 minor enhancements
629
-
630
- * Added bin/xlsopcodes, a tool for examining Excel files
631
-
632
- * Documents created by Spreadsheet can now be Printed in Excel and
633
- Excel-Viewer.
634
- This issue was reported by Spencer Turner in
635
- http://rubyforge.org/tracker/index.php?func=detail&aid=23287&group_id=678&atid=2677
636
-
637
- ### 0.6.2.1 / 2008-12-18
638
-
639
- * 1 Bugfix
640
-
641
- * Using Spreadsheet together with 'jcode' could lead to broken Excel-Files
642
- Thanks to Eugene Mikhailov for tracking this one down in:
643
- http://rubyforge.org/tracker/index.php?func=detail&aid=23085&group_id=678&atid=2677
644
-
645
- ### 0.6.2 / 2008-12-11
646
-
647
- * 14 Bugfixes
648
-
649
- * Fixed a bug where #<boolean>! methods did not trigger a call to
650
- #row_updated
651
-
652
- * Corrected the Row-Format in both Reader and Writer (was Biff5 for some
653
- reason)
654
-
655
- * Populates Row-instances with @default_format, @height, @outline_level
656
- and @hidden attributes
657
-
658
- * Fixed a Bug where Workbooks deriving from a Template-Workbook without
659
- SST could not be saved
660
- Reported in
661
- http://rubyforge.org/tracker/index.php?func=detail&aid=22863&group_id=678&atid=2678
662
-
663
- * Improved handling of Numeric Values (writes a RK-Entry for a Float
664
- only if it can be encoded with 4 leading zeroes, and a Number-Entry for an
665
- Integer only if it cannot be encoded as an RK)
666
-
667
- * Fixes a bug where changes to a Row were ignored if they were
668
- outside of an existing Row-Block.
669
-
670
- * Fixes a bug where MULRK-Entries sometimes only contained a single RK
671
-
672
- * Fixes a bug where formatting was ignored if it was applied to empty Rows
673
- Reported by Zomba Lumix in
674
- http://rubyforge.org/forum/message.php?msg_id=61985
675
-
676
- * Fixes a bug where modifying a Row in a loaded Workbook could lead to Rows
677
- with smaller indices being set to nil.
678
- Reported by Ivan Samsonov in
679
- http://rubyforge.org/forum/message.php?msg_id=62816
680
-
681
- * Deals with rounding-problems when calculating Time
682
- Reported by Bughunter extraordinaire Bjørn Hjelle
683
-
684
- * Correct splitting of wide characters in SST
685
- Reported by Michel Ziegler and by Eugene Mikhailov in
686
- http://rubyforge.org/tracker/index.php?func=detail&aid=23085&group_id=678&atid=2677
687
-
688
- * Fix an off-by-one error in write_mulrk that caused Excel to complain that
689
- 'Data may be lost', reported by Emma in
690
- http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/321979
691
- and by Chris Lowis in
692
- http://rubyforge.org/tracker/index.php?func=detail&aid=22892&group_id=678&atid=2677
693
-
694
-
695
- * Read formats correctly in read_mulrk
696
- Reported by Ivan Samsonov
697
- Fixes that part of http://rubyforge.org/forum/message.php?msg_id=62821
698
- which is a bug. Does nothing for the disappearance of Rich-Text
699
- formatting, which will not be addressed until 0.7.0
700
-
701
- * Fixes a (benign?) bug, where adding text to a template-file resulted in
702
- a duplicate extsst-record.
703
-
704
- * 2 minor enhancements
705
-
706
- * Improved recognition of Time-Formats
707
-
708
- * Improvement to Robustness: allow Spreadsheet::Workbook.new
709
- Takes care of http://rubyforge.org/forum/message.php?msg_id=62941
710
- Reported by David Chamberlain
711
-
712
- ### 0.6.1.9 / 2008-11-07
713
-
714
- * 1 Bugfix
715
-
716
- * Fixes a precision-issue in Excel::Row#datetime: Excel records Time-Values
717
- with more significant bits (but not necessarily more precise) than
718
- DateTime can handle.
719
- (Thanks to Bjørn Hjelle for the Bugreport)
720
-
721
- * 1 minor enhancement
722
-
723
- * Added support for appending Worksheets to a Workbook
724
- (Thanks to Mohammed Rabbani for the report)
725
-
726
- ### 0.6.1.8 / 2008-10-31
727
-
728
- * 1 Bugfix
729
-
730
- * Fixes a bug where out-of-sequence reading of multiple Worksheets could
731
- lead to data from the wrong Sheet being returned.
732
- (Thanks to Bugreporter extraordinaire Bjørn Hjelle)
733
-
734
- ### 0.6.1.7 / 2008-10-30
735
-
736
- * 1 Bugfix
737
-
738
- * Fixes a bug where all Formulas were ignored.
739
- (Thanks to Bjørn Hjelle for the report)
740
-
741
- * 1 minor enhancement
742
-
743
- * Allow the substitution of an IO object with a StringIO.
744
- (Thanks to luxor for the report)
745
-
746
- ### 0.6.1.6 / 2008-10-28
747
-
748
- * 2 Bugfixes
749
-
750
- * Fixed encoding and decoding of BigNums, negative and other large Numbers
751
- http://rubyforge.org/tracker/index.php?func=detail&aid=22581&group_id=678&atid=2677
752
- * Fix a bug where modifications to default columns weren't stored
753
- http://rubyforge.org/forum/message.php?msg_id=61567
754
-
755
- * 1 minor enhancement
756
-
757
- * Row#enriched_data won't return a Bogus-Date if the data isn't a Numeric
758
- value
759
- (Thanks to Bjørn Hjelle for the report)
760
-
761
- ### 0.6.1.5 / 2008-10-24
762
-
763
- * 2 Bugfixes
764
-
765
- * Removed obsolete code which triggered Iconv::InvalidEncoding
766
- on Systems with non-gnu Iconv:
767
- http://rubyforge.org/tracker/index.php?func=detail&aid=22541&group_id=678&atid=2677
768
- * Handle empty Worksheets
769
- (Thanks to Charles Lowe for the Patches)
770
-
771
- ### 0.6.1.4 / 2008-10-23
772
-
773
- * 1 Bugfix
774
-
775
- * Biff8#wide now works properly even if $KCODE=='UTF-8'
776
- (Thanks to Bjørn Hjelle for the Bugreport)
777
-
778
- * 1 minor enhancement
779
-
780
- * Read/Write functionality for Links (only URLs can be written as of now)
781
-
782
- ### 0.6.1.3 / 2008-10-21
783
-
784
- * 2 Bugfixes
785
-
786
- * Renamed UTF8 to UTF-8 to support freebsd
787
- (Thanks to Jacob Atzen for the Patch)
788
- * Fixes a Bug where only the first Rowblock was read correctly if there were
789
- no DBCELL records terminating the Rowblocks.
790
- (Thanks to Bjørn Hjelle for the Bugreport)
791
-
792
- ### 0.6.1.2 / 2008-10-20
793
-
794
- * 2 Bugfixes
795
-
796
- * Corrected the Font-Encoding values in Excel::Internals
797
- (Thanks to Bjørn Hjelle for the Bugreport)
798
- * Spreadsheet now skips Richtext-Formatting runs and Asian Phonetic
799
- Settings when reading the SST, fixing a problem where the presence of
800
- Richtext could lead to an incomplete SST.
801
-
802
- ### 0.6.1.1 / 2008-10-20
803
-
804
- * 1 Bugfix
805
-
806
- * Corrected the Manifest - included column.rb
807
-
808
- ### 0.6.1 / 2008-10-17
809
-
810
- * 3 minor enhancements
811
-
812
- * Adds Column formatting and Worksheet#format_column
813
- * Reads and writes correct Fonts (Font-indices > 3 appear to be 1-based)
814
- * Reads xf data
815
-
816
- ### 0.6.0 / 2008-10-13
817
-
818
- * 1 major enhancement
819
-
820
- * Initial upload of the shiny new Spreadsheet Gem after three weeks of
821
- grueling labor in the dark binary mines of Little-Endian Biff and long
822
- hours spent polishing the surfaces of documentation.
823
-
824
-