ruby-spreadsheet 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/GUIDE.txt +267 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +20 -0
- data/History.txt +307 -0
- data/LICENSE.txt +619 -0
- data/README.txt +91 -0
- data/Rakefile +53 -0
- data/VERSION +1 -0
- data/bin/xlsopcodes +18 -0
- data/lib/parseexcel.rb +27 -0
- data/lib/parseexcel/parseexcel.rb +75 -0
- data/lib/parseexcel/parser.rb +11 -0
- data/lib/spreadsheet.rb +79 -0
- data/lib/spreadsheet/column.rb +71 -0
- data/lib/spreadsheet/compatibility.rb +23 -0
- data/lib/spreadsheet/datatypes.rb +110 -0
- data/lib/spreadsheet/encodings.rb +46 -0
- data/lib/spreadsheet/excel.rb +88 -0
- data/lib/spreadsheet/excel/error.rb +26 -0
- data/lib/spreadsheet/excel/internals.rb +386 -0
- data/lib/spreadsheet/excel/internals/biff5.rb +17 -0
- data/lib/spreadsheet/excel/internals/biff8.rb +19 -0
- data/lib/spreadsheet/excel/offset.rb +41 -0
- data/lib/spreadsheet/excel/reader.rb +1173 -0
- data/lib/spreadsheet/excel/reader/biff5.rb +22 -0
- data/lib/spreadsheet/excel/reader/biff8.rb +193 -0
- data/lib/spreadsheet/excel/row.rb +92 -0
- data/lib/spreadsheet/excel/sst_entry.rb +46 -0
- data/lib/spreadsheet/excel/workbook.rb +80 -0
- data/lib/spreadsheet/excel/worksheet.rb +100 -0
- data/lib/spreadsheet/excel/writer.rb +1 -0
- data/lib/spreadsheet/excel/writer/biff8.rb +75 -0
- data/lib/spreadsheet/excel/writer/format.rb +253 -0
- data/lib/spreadsheet/excel/writer/workbook.rb +652 -0
- data/lib/spreadsheet/excel/writer/worksheet.rb +948 -0
- data/lib/spreadsheet/font.rb +92 -0
- data/lib/spreadsheet/format.rb +177 -0
- data/lib/spreadsheet/formula.rb +9 -0
- data/lib/spreadsheet/helpers.rb +11 -0
- data/lib/spreadsheet/link.rb +43 -0
- data/lib/spreadsheet/row.rb +132 -0
- data/lib/spreadsheet/workbook.rb +120 -0
- data/lib/spreadsheet/worksheet.rb +279 -0
- data/lib/spreadsheet/writer.rb +30 -0
- data/ruby-spreadsheet.gemspec +126 -0
- data/test/data/test_changes.xls +0 -0
- data/test/data/test_copy.xls +0 -0
- data/test/data/test_datetime.xls +0 -0
- data/test/data/test_empty.xls +0 -0
- data/test/data/test_formula.xls +0 -0
- data/test/data/test_missing_row.xls +0 -0
- data/test/data/test_version_excel5.xls +0 -0
- data/test/data/test_version_excel95.xls +0 -0
- data/test/data/test_version_excel97.xls +0 -0
- data/test/excel/row.rb +35 -0
- data/test/excel/writer/worksheet.rb +23 -0
- data/test/font.rb +163 -0
- data/test/integration.rb +1281 -0
- data/test/row.rb +33 -0
- data/test/suite.rb +14 -0
- data/test/workbook.rb +21 -0
- data/test/worksheet.rb +80 -0
- metadata +203 -0
@@ -0,0 +1,120 @@
|
|
1
|
+
require 'spreadsheet/format'
|
2
|
+
require 'spreadsheet/encodings'
|
3
|
+
|
4
|
+
module Spreadsheet
|
5
|
+
##
|
6
|
+
# The Workbook class represents a Spreadsheet-Document and is the entry point
|
7
|
+
# for all Spreadsheet manipulation.
|
8
|
+
#
|
9
|
+
# Interesting Attributes:
|
10
|
+
# #default_format:: The default format used for all cells in this Workbook.
|
11
|
+
# that have no format set explicitly or in
|
12
|
+
# Row#default_format or Worksheet#default_format.
|
13
|
+
class Workbook
|
14
|
+
include Spreadsheet::Encodings
|
15
|
+
attr_reader :io, :worksheets, :formats, :fonts
|
16
|
+
attr_accessor :active_worksheet, :encoding, :default_format, :version
|
17
|
+
def initialize io = nil, opts={:default_format => Format.new}
|
18
|
+
@worksheets = []
|
19
|
+
@io = io
|
20
|
+
@fonts = []
|
21
|
+
@formats = []
|
22
|
+
if @default_format = opts[:default_format]
|
23
|
+
@formats.push @default_format
|
24
|
+
end
|
25
|
+
end
|
26
|
+
##
|
27
|
+
# Add a Font to the Workbook. Used by the parser. You should not need to
|
28
|
+
# use this Method.
|
29
|
+
def add_font font
|
30
|
+
@fonts.push(font).uniq! if font
|
31
|
+
font
|
32
|
+
end
|
33
|
+
##
|
34
|
+
# Add a Format to the Workbook. If you use Row#set_format, you should not
|
35
|
+
# need to use this Method.
|
36
|
+
def add_format format
|
37
|
+
@formats.push(format) if format && !@formats.include?(format)
|
38
|
+
format
|
39
|
+
end
|
40
|
+
##
|
41
|
+
# Add a Worksheet to the Workbook.
|
42
|
+
def add_worksheet worksheet
|
43
|
+
worksheet.workbook = self
|
44
|
+
@worksheets.push worksheet
|
45
|
+
worksheet
|
46
|
+
end
|
47
|
+
##
|
48
|
+
# Create a new Worksheet in this Workbook.
|
49
|
+
# Used without options this creates a Worksheet with the name 'WorksheetN'
|
50
|
+
# where the new Worksheet is the Nth Worksheet in this Workbook.
|
51
|
+
#
|
52
|
+
# Use the option <em>:name => 'My pretty Name'</em> to override this
|
53
|
+
# behavior.
|
54
|
+
def create_worksheet opts = {}
|
55
|
+
opts[:name] ||= client("Worksheet#{@worksheets.size.next}", 'UTF-8')
|
56
|
+
add_worksheet Worksheet.new(opts)
|
57
|
+
end
|
58
|
+
##
|
59
|
+
# The Font at _idx_
|
60
|
+
def font idx
|
61
|
+
@fonts[idx]
|
62
|
+
end
|
63
|
+
##
|
64
|
+
# The Format at _idx_, or - if _idx_ is a String -
|
65
|
+
# the Format with name == _idx_
|
66
|
+
def format idx
|
67
|
+
case idx
|
68
|
+
when Integer
|
69
|
+
@formats[idx] || @default_format
|
70
|
+
when String
|
71
|
+
@formats.find do |fmt| fmt.name == idx end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
def inspect
|
75
|
+
variables = (instance_variables - uninspect_variables).collect do |name|
|
76
|
+
"%s=%s" % [name, instance_variable_get(name)]
|
77
|
+
end.join(' ')
|
78
|
+
uninspect = uninspect_variables.collect do |name|
|
79
|
+
var = instance_variable_get name
|
80
|
+
"%s=%s[%i]" % [name, var.class, var.size]
|
81
|
+
end.join(' ')
|
82
|
+
sprintf "#<%s:0x%014x %s %s>", self.class, object_id,
|
83
|
+
variables, uninspect
|
84
|
+
end
|
85
|
+
def uninspect_variables # :nodoc:
|
86
|
+
%w{@formats @fonts @worksheets}
|
87
|
+
end
|
88
|
+
##
|
89
|
+
# The Worksheet at _idx_, or - if _idx_ is a String -
|
90
|
+
# the Worksheet with name == _idx_
|
91
|
+
def worksheet idx
|
92
|
+
case idx
|
93
|
+
when Integer
|
94
|
+
@worksheets[idx]
|
95
|
+
when String
|
96
|
+
@worksheets.find do |sheet| sheet.name == idx end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
##
|
100
|
+
# Write this Workbook to a File, IO Stream or Writer Object. The latter will
|
101
|
+
# make more sense once there are more than just an Excel-Writer available.
|
102
|
+
def write io_path_or_writer
|
103
|
+
if io_path_or_writer.is_a? Writer
|
104
|
+
io_path_or_writer.write self
|
105
|
+
else
|
106
|
+
writer(io_path_or_writer).write(self)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
##
|
110
|
+
# Returns a new instance of the default Writer class for this Workbook (can
|
111
|
+
# only be an Excel::Writer::Workbook at this time)
|
112
|
+
def writer io_or_path, type=Excel, version=self.version
|
113
|
+
if type == Excel
|
114
|
+
Excel::Writer::Workbook.new io_or_path
|
115
|
+
else
|
116
|
+
raise NotImplementedError, "No Writer defined for #{type}"
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
@@ -0,0 +1,279 @@
|
|
1
|
+
require 'date'
|
2
|
+
require 'spreadsheet/column'
|
3
|
+
require 'spreadsheet/encodings'
|
4
|
+
require 'spreadsheet/row'
|
5
|
+
|
6
|
+
module Spreadsheet
|
7
|
+
##
|
8
|
+
# The Worksheet class. Contains most of the Spreadsheet data in Rows.
|
9
|
+
#
|
10
|
+
# Interesting Attributes
|
11
|
+
# #name :: The Name of this Worksheet.
|
12
|
+
# #default_format:: The default format used for all cells in this Workhseet
|
13
|
+
# that have no format set explicitly or in
|
14
|
+
# Row#default_format.
|
15
|
+
# #rows :: The Rows in this Worksheet. It is not recommended to
|
16
|
+
# Manipulate this Array directly. If you do, call
|
17
|
+
# #updated_from with the smallest modified index.
|
18
|
+
# #columns :: The Column formatting in this Worksheet. Column
|
19
|
+
# instances may appear at more than one position in #columns.
|
20
|
+
# If you modify a Column directly, your changes will be
|
21
|
+
# reflected in all those positions.
|
22
|
+
# #selected :: When a user chooses to print a Workbook, Excel will include
|
23
|
+
# all selected Worksheets. If no Worksheet is selected at
|
24
|
+
# Workbook#write, then the first Worksheet is selected by
|
25
|
+
# default.
|
26
|
+
class Worksheet
|
27
|
+
include Spreadsheet::Encodings
|
28
|
+
include Enumerable
|
29
|
+
attr_accessor :name, :selected, :workbook, :orientation
|
30
|
+
attr_accessor :fit_width_to_pages, :fit_height_to_pages
|
31
|
+
attr_reader :rows, :columns
|
32
|
+
def initialize opts={}
|
33
|
+
@default_format = nil
|
34
|
+
@selected = opts[:selected]
|
35
|
+
@dimensions = [0,0,0,0]
|
36
|
+
@orientation = :portrait
|
37
|
+
@name = opts[:name] || 'Worksheet'
|
38
|
+
@workbook = opts[:workbook]
|
39
|
+
@rows = []
|
40
|
+
@columns = []
|
41
|
+
@links = {}
|
42
|
+
end
|
43
|
+
def active # :nodoc:
|
44
|
+
warn "Worksheet#active is deprecated. Please use Worksheet#selected instead."
|
45
|
+
selected
|
46
|
+
end
|
47
|
+
def active= selected # :nodoc:
|
48
|
+
warn "Worksheet#active= is deprecated. Please use Worksheet#selected= instead."
|
49
|
+
self.selected = selected
|
50
|
+
end
|
51
|
+
##
|
52
|
+
# Add a Format to the Workbook. If you use Row#set_format, you should not
|
53
|
+
# need to use this Method.
|
54
|
+
def add_format fmt
|
55
|
+
@workbook.add_format fmt if fmt
|
56
|
+
end
|
57
|
+
##
|
58
|
+
# Get the enriched value of the Cell at _row_, _column_.
|
59
|
+
# See also Worksheet#[], Row#[].
|
60
|
+
def cell row, column
|
61
|
+
row(row)[column]
|
62
|
+
end
|
63
|
+
##
|
64
|
+
# Returns the Column at _idx_.
|
65
|
+
def column idx
|
66
|
+
@columns[idx] || Column.new(idx, default_format, :worksheet => self)
|
67
|
+
end
|
68
|
+
##
|
69
|
+
# The number of columns in this Worksheet which contain data.
|
70
|
+
def column_count
|
71
|
+
dimensions[3] - dimensions[2]
|
72
|
+
end
|
73
|
+
def column_updated idx, column
|
74
|
+
@columns[idx] = column
|
75
|
+
end
|
76
|
+
##
|
77
|
+
# Delete the Row at _idx_ (0-based) from this Worksheet.
|
78
|
+
def delete_row idx
|
79
|
+
res = @rows.delete_at idx
|
80
|
+
updated_from idx
|
81
|
+
res
|
82
|
+
end
|
83
|
+
##
|
84
|
+
# The default Format of this Worksheet, if you have set one.
|
85
|
+
# Returns the Workbook's default Format otherwise.
|
86
|
+
def default_format
|
87
|
+
@default_format || @workbook.default_format
|
88
|
+
end
|
89
|
+
##
|
90
|
+
# Set the default Format of this Worksheet.
|
91
|
+
def default_format= format
|
92
|
+
@default_format = format
|
93
|
+
add_format format
|
94
|
+
format
|
95
|
+
end
|
96
|
+
##
|
97
|
+
# Dimensions:: [ first used row, first unused row,
|
98
|
+
# first used column, first unused column ]
|
99
|
+
# ( First used means that all rows or columns before that are
|
100
|
+
# empty. First unused means that this and all following rows
|
101
|
+
# or columns are empty. )
|
102
|
+
def dimensions
|
103
|
+
@dimensions || recalculate_dimensions
|
104
|
+
end
|
105
|
+
##
|
106
|
+
# If no argument is given, #each iterates over all used Rows (from the first
|
107
|
+
# used Row until but omitting the first unused Row, see also #dimensions).
|
108
|
+
#
|
109
|
+
# If the argument skip is given, #each iterates from that row until but
|
110
|
+
# omitting the first unused Row, effectively skipping the first _skip_ Rows
|
111
|
+
# from the top of the Worksheet.
|
112
|
+
def each skip=dimensions[0], &block
|
113
|
+
skip.upto(dimensions[1] - 1) do |idx|
|
114
|
+
block.call row(idx)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
def encoding # :nodoc:
|
118
|
+
@workbook.encoding
|
119
|
+
end
|
120
|
+
##
|
121
|
+
# Sets the default Format of the column at _idx_.
|
122
|
+
#
|
123
|
+
# _idx_ may be an Integer, or an Enumerable that iterates over a number of
|
124
|
+
# Integers.
|
125
|
+
#
|
126
|
+
# _format_ is a Format, or nil if you want to remove the Formatting at _idx_
|
127
|
+
#
|
128
|
+
# Returns an instance of Column if _idx_ is an Integer, an Array of Columns
|
129
|
+
# otherwise.
|
130
|
+
def format_column idx, format=nil, opts={}
|
131
|
+
opts[:worksheet] = self
|
132
|
+
res = case idx
|
133
|
+
when Integer
|
134
|
+
column = nil
|
135
|
+
if format
|
136
|
+
column = Column.new(idx, format, opts)
|
137
|
+
end
|
138
|
+
@columns[idx] = column
|
139
|
+
else
|
140
|
+
idx.collect do |col| format_column col, format, opts end
|
141
|
+
end
|
142
|
+
shorten @columns
|
143
|
+
res
|
144
|
+
end
|
145
|
+
##
|
146
|
+
# Formats all Date, DateTime and Time cells with _format_ or the default
|
147
|
+
# formats:
|
148
|
+
# - 'DD.MM.YYYY' for Date
|
149
|
+
# - 'DD.MM.YYYY hh:mm:ss' for DateTime and Time
|
150
|
+
def format_dates! format=nil
|
151
|
+
each do |row|
|
152
|
+
row.each_with_index do |value, idx|
|
153
|
+
unless row.formats[idx] || row.format(idx).date_or_time?
|
154
|
+
numfmt = case value
|
155
|
+
when DateTime, Time
|
156
|
+
format || client('DD.MM.YYYY hh:mm:ss', 'UTF-8')
|
157
|
+
when Date
|
158
|
+
format || client('DD.MM.YYYY', 'UTF-8')
|
159
|
+
end
|
160
|
+
case numfmt
|
161
|
+
when Format
|
162
|
+
row.set_format idx, numfmt
|
163
|
+
when String
|
164
|
+
fmt = row.format(idx).dup
|
165
|
+
fmt.number_format = numfmt
|
166
|
+
row.set_format idx, fmt
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
172
|
+
##
|
173
|
+
# Insert a Row at _idx_ (0-based) containing _cells_
|
174
|
+
def insert_row idx, cells=[]
|
175
|
+
res = @rows.insert idx, Row.new(self, idx, cells)
|
176
|
+
updated_from idx
|
177
|
+
res
|
178
|
+
end
|
179
|
+
def inspect
|
180
|
+
names = instance_variables
|
181
|
+
names.delete '@rows'
|
182
|
+
variables = names.collect do |name|
|
183
|
+
"%s=%s" % [name, instance_variable_get(name)]
|
184
|
+
end.join(' ')
|
185
|
+
sprintf "#<%s:0x%014x %s @rows[%i]>", self.class, object_id,
|
186
|
+
variables, row_count
|
187
|
+
end
|
188
|
+
## The last Row containing any data
|
189
|
+
def last_row
|
190
|
+
row(last_row_index)
|
191
|
+
end
|
192
|
+
## The index of the last Row containing any data
|
193
|
+
def last_row_index
|
194
|
+
[dimensions[1] - 1, 0].max
|
195
|
+
end
|
196
|
+
##
|
197
|
+
# Replace the Row at _idx_ with the following arguments. Like #update_row,
|
198
|
+
# but truncates the Row if there are fewer arguments than Cells in the Row.
|
199
|
+
def replace_row idx, *cells
|
200
|
+
if(row = @rows[idx]) && cells.size < row.size
|
201
|
+
cells.concat Array.new(row.size - cells.size)
|
202
|
+
end
|
203
|
+
update_row idx, *cells
|
204
|
+
end
|
205
|
+
##
|
206
|
+
# The Row at _idx_ or a new Row.
|
207
|
+
def row idx
|
208
|
+
@rows[idx] || Row.new(self, idx)
|
209
|
+
end
|
210
|
+
##
|
211
|
+
# The number of Rows in this Worksheet which contain data.
|
212
|
+
def row_count
|
213
|
+
dimensions[1] - dimensions[0]
|
214
|
+
end
|
215
|
+
##
|
216
|
+
# Tell Worksheet that the Row at _idx_ has been updated and the #dimensions
|
217
|
+
# need to be recalculated. You should not need to call this directly.
|
218
|
+
def row_updated idx, row
|
219
|
+
@dimensions = nil
|
220
|
+
@rows[idx] = row
|
221
|
+
end
|
222
|
+
##
|
223
|
+
# Updates the Row at _idx_ with the following arguments.
|
224
|
+
def update_row idx, *cells
|
225
|
+
res = if row = @rows[idx]
|
226
|
+
row[0, cells.size] = cells
|
227
|
+
row
|
228
|
+
else
|
229
|
+
Row.new self, idx, cells
|
230
|
+
end
|
231
|
+
row_updated idx, res
|
232
|
+
res
|
233
|
+
end
|
234
|
+
##
|
235
|
+
# Renumbers all Rows starting at _idx_ and calls #row_updated for each of
|
236
|
+
# them.
|
237
|
+
def updated_from index
|
238
|
+
index.upto(@rows.size - 1) do |idx|
|
239
|
+
row = row(idx)
|
240
|
+
row.idx = idx
|
241
|
+
row_updated idx, row
|
242
|
+
end
|
243
|
+
end
|
244
|
+
##
|
245
|
+
# Get the enriched value of the Cell at _row_, _column_.
|
246
|
+
# See also Worksheet#cell, Row#[].
|
247
|
+
def [] row, column
|
248
|
+
row(row)[column]
|
249
|
+
end
|
250
|
+
##
|
251
|
+
# Set the value of the Cell at _row_, _column_ to _value_.
|
252
|
+
# See also Row#[]=.
|
253
|
+
def []= row, column, value
|
254
|
+
row(row)[column] = value
|
255
|
+
end
|
256
|
+
private
|
257
|
+
def index_of_first ary # :nodoc:
|
258
|
+
return unless ary
|
259
|
+
ary.index(ary.find do |elm| elm end)
|
260
|
+
end
|
261
|
+
def recalculate_dimensions # :nodoc:
|
262
|
+
shorten @rows
|
263
|
+
@dimensions = []
|
264
|
+
@dimensions[0] = index_of_first(@rows) || 0
|
265
|
+
@dimensions[1] = @rows.size
|
266
|
+
compact = @rows.compact
|
267
|
+
@dimensions[2] = compact.collect do |row| row.first_used end.compact.min || 0
|
268
|
+
@dimensions[3] = compact.collect do |row| row.first_unused end.max || 0
|
269
|
+
@dimensions
|
270
|
+
end
|
271
|
+
def shorten ary # :nodoc:
|
272
|
+
return unless ary
|
273
|
+
while !ary.empty? && !ary.last
|
274
|
+
ary.pop
|
275
|
+
end
|
276
|
+
ary unless ary.empty?
|
277
|
+
end
|
278
|
+
end
|
279
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Spreadsheet
|
2
|
+
##
|
3
|
+
# Parent Class for all Writers. Implements the copying of unmodified
|
4
|
+
# Spreadsheet documents.
|
5
|
+
class Writer
|
6
|
+
def initialize io_or_path
|
7
|
+
@io_or_path = io_or_path
|
8
|
+
end
|
9
|
+
def write workbook
|
10
|
+
if @io_or_path.respond_to? :seek
|
11
|
+
@io_or_path.binmode
|
12
|
+
write_workbook workbook, @io_or_path
|
13
|
+
else
|
14
|
+
File.open(@io_or_path, "wb+") do |fh|
|
15
|
+
write_workbook workbook, fh
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
private
|
20
|
+
def write_workbook workbook, io
|
21
|
+
reader = workbook.io
|
22
|
+
unless io == reader
|
23
|
+
reader.rewind
|
24
|
+
data = reader.read
|
25
|
+
io.rewind
|
26
|
+
io.write data
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,126 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{ruby-spreadsheet}
|
8
|
+
s.version = "0.6.5"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Dmitry Lihachev", "Masaomi Hatakeyama", "Zeno R.R. Davatz"]
|
12
|
+
s.date = %q{2010-12-20}
|
13
|
+
s.description = %q{As of version 0.6.0, only Microsoft Excel compatible spreadsheets are supported}
|
14
|
+
s.email = %q{lda@openteam.ru, mhatakeyama@ywesee.com, zdavatz@ywesee.com}
|
15
|
+
s.executables = ["xlsopcodes", "xlsopcodes"]
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"LICENSE.txt",
|
18
|
+
"README.txt"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
".document",
|
22
|
+
"GUIDE.txt",
|
23
|
+
"Gemfile",
|
24
|
+
"Gemfile.lock",
|
25
|
+
"History.txt",
|
26
|
+
"LICENSE.txt",
|
27
|
+
"README.txt",
|
28
|
+
"Rakefile",
|
29
|
+
"VERSION",
|
30
|
+
"bin/xlsopcodes",
|
31
|
+
"lib/parseexcel.rb",
|
32
|
+
"lib/parseexcel/parseexcel.rb",
|
33
|
+
"lib/parseexcel/parser.rb",
|
34
|
+
"lib/spreadsheet.rb",
|
35
|
+
"lib/spreadsheet/column.rb",
|
36
|
+
"lib/spreadsheet/compatibility.rb",
|
37
|
+
"lib/spreadsheet/datatypes.rb",
|
38
|
+
"lib/spreadsheet/encodings.rb",
|
39
|
+
"lib/spreadsheet/excel.rb",
|
40
|
+
"lib/spreadsheet/excel/error.rb",
|
41
|
+
"lib/spreadsheet/excel/internals.rb",
|
42
|
+
"lib/spreadsheet/excel/internals/biff5.rb",
|
43
|
+
"lib/spreadsheet/excel/internals/biff8.rb",
|
44
|
+
"lib/spreadsheet/excel/offset.rb",
|
45
|
+
"lib/spreadsheet/excel/reader.rb",
|
46
|
+
"lib/spreadsheet/excel/reader/biff5.rb",
|
47
|
+
"lib/spreadsheet/excel/reader/biff8.rb",
|
48
|
+
"lib/spreadsheet/excel/row.rb",
|
49
|
+
"lib/spreadsheet/excel/sst_entry.rb",
|
50
|
+
"lib/spreadsheet/excel/workbook.rb",
|
51
|
+
"lib/spreadsheet/excel/worksheet.rb",
|
52
|
+
"lib/spreadsheet/excel/writer.rb",
|
53
|
+
"lib/spreadsheet/excel/writer/biff8.rb",
|
54
|
+
"lib/spreadsheet/excel/writer/format.rb",
|
55
|
+
"lib/spreadsheet/excel/writer/workbook.rb",
|
56
|
+
"lib/spreadsheet/excel/writer/worksheet.rb",
|
57
|
+
"lib/spreadsheet/font.rb",
|
58
|
+
"lib/spreadsheet/format.rb",
|
59
|
+
"lib/spreadsheet/formula.rb",
|
60
|
+
"lib/spreadsheet/helpers.rb",
|
61
|
+
"lib/spreadsheet/link.rb",
|
62
|
+
"lib/spreadsheet/row.rb",
|
63
|
+
"lib/spreadsheet/workbook.rb",
|
64
|
+
"lib/spreadsheet/worksheet.rb",
|
65
|
+
"lib/spreadsheet/writer.rb",
|
66
|
+
"ruby-spreadsheet.gemspec",
|
67
|
+
"test/data/test_changes.xls",
|
68
|
+
"test/data/test_copy.xls",
|
69
|
+
"test/data/test_datetime.xls",
|
70
|
+
"test/data/test_empty.xls",
|
71
|
+
"test/data/test_formula.xls",
|
72
|
+
"test/data/test_missing_row.xls",
|
73
|
+
"test/data/test_version_excel5.xls",
|
74
|
+
"test/data/test_version_excel95.xls",
|
75
|
+
"test/data/test_version_excel97.xls",
|
76
|
+
"test/excel/row.rb",
|
77
|
+
"test/excel/writer/worksheet.rb",
|
78
|
+
"test/font.rb",
|
79
|
+
"test/integration.rb",
|
80
|
+
"test/row.rb",
|
81
|
+
"test/suite.rb",
|
82
|
+
"test/workbook.rb",
|
83
|
+
"test/worksheet.rb"
|
84
|
+
]
|
85
|
+
s.homepage = %q{http://github.com/lda/ruby-spreadsheet}
|
86
|
+
s.licenses = ["GPLv3"]
|
87
|
+
s.require_paths = ["lib"]
|
88
|
+
s.rubygems_version = %q{1.3.7}
|
89
|
+
s.summary = %q{The Spreadsheet Library is designed to read and write Spreadsheet Documents}
|
90
|
+
s.test_files = [
|
91
|
+
"test/excel/row.rb",
|
92
|
+
"test/excel/writer/worksheet.rb",
|
93
|
+
"test/font.rb",
|
94
|
+
"test/integration.rb",
|
95
|
+
"test/row.rb",
|
96
|
+
"test/suite.rb",
|
97
|
+
"test/workbook.rb",
|
98
|
+
"test/worksheet.rb"
|
99
|
+
]
|
100
|
+
|
101
|
+
if s.respond_to? :specification_version then
|
102
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
103
|
+
s.specification_version = 3
|
104
|
+
|
105
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
106
|
+
s.add_runtime_dependency(%q<ruby-ole>, [">= 0"])
|
107
|
+
s.add_development_dependency(%q<bundler>, [">= 0"])
|
108
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
109
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
110
|
+
s.add_runtime_dependency(%q<ruby-ole>, ["> 1.2"])
|
111
|
+
else
|
112
|
+
s.add_dependency(%q<ruby-ole>, [">= 0"])
|
113
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
114
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
115
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
116
|
+
s.add_dependency(%q<ruby-ole>, ["> 1.2"])
|
117
|
+
end
|
118
|
+
else
|
119
|
+
s.add_dependency(%q<ruby-ole>, [">= 0"])
|
120
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
121
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
122
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
123
|
+
s.add_dependency(%q<ruby-ole>, ["> 1.2"])
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|