simple-spreadsheet 0.0.5 → 0.0.5.1
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/.gitignore +6 -0
- data/.rspec +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +60 -0
- data/README.md +94 -0
- data/Rakefile +6 -0
- data/lib/simple_spreadsheet.rb +114 -0
- data/lib/simple_spreadsheet/classes/csv_extended.rb +64 -0
- data/lib/simple_spreadsheet/classes/csvt_extended.rb +64 -0
- data/lib/simple_spreadsheet/classes/csvx_extended.rb +64 -0
- data/lib/simple_spreadsheet/classes/excel_extended.rb +37 -0
- data/lib/simple_spreadsheet/editors/csv_editor.rb +3 -0
- data/lib/simple_spreadsheet/editors/excel_editor.rb +3 -0
- data/lib/simple_spreadsheet/editors/excelx_editor.rb +3 -0
- data/lib/simple_spreadsheet/editors/excelxml_editor.rb +3 -0
- data/lib/simple_spreadsheet/editors/google_editor.rb +3 -0
- data/lib/simple_spreadsheet/editors/openoffice_editor.rb +3 -0
- data/lib/simple_spreadsheet/editors/spreadsheet_editor.rb +3 -0
- data/lib/simple_spreadsheet/exceptions.rb +5 -0
- data/lib/simple_spreadsheet/generic_sheet.rb +11 -0
- data/lib/simple_spreadsheet/modules/roo_module.rb +39 -0
- data/lib/simple_spreadsheet/readers/csv_reader.rb +12 -0
- data/lib/simple_spreadsheet/readers/csvt_reader.rb +12 -0
- data/lib/simple_spreadsheet/readers/csvx_reader.rb +12 -0
- data/lib/simple_spreadsheet/readers/excel_reader.rb +12 -0
- data/lib/simple_spreadsheet/readers/excelx_reader.rb +12 -0
- data/lib/simple_spreadsheet/readers/openoffice_reader.rb +12 -0
- data/lib/simple_spreadsheet/readers/spreadsheet_reader.rb +31 -0
- data/lib/simple_spreadsheet/version.rb +3 -0
- data/lib/simple_spreadsheet/writers/csv_writer.rb +3 -0
- data/lib/simple_spreadsheet/writers/excel_writer.rb +3 -0
- data/lib/simple_spreadsheet/writers/excelx_writer.rb +3 -0
- data/lib/simple_spreadsheet/writers/excelxml_writer.rb +3 -0
- data/lib/simple_spreadsheet/writers/google_writer.rb +3 -0
- data/lib/simple_spreadsheet/writers/openoffice_writer.rb +3 -0
- data/lib/simple_spreadsheet/writers/spreadsheet_writer.rb +3 -0
- data/simple_spreadsheet.gemspec +23 -0
- data/spec/fixtures/file.csv +1 -0
- data/spec/fixtures/file.csvt +1 -0
- data/spec/fixtures/file.csvx +1 -0
- data/spec/fixtures/file.ods +0 -0
- data/spec/fixtures/file.xls +0 -0
- data/spec/fixtures/file.xlsx +0 -0
- data/spec/simple_spreadsheet_csv_spec.rb +27 -0
- data/spec/simple_spreadsheet_csvt_spec.rb +27 -0
- data/spec/simple_spreadsheet_csvx_spec.rb +27 -0
- data/spec/simple_spreadsheet_ods_spec.rb +41 -0
- data/spec/simple_spreadsheet_spec.rb +7 -0
- data/spec/simple_spreadsheet_xls_spec.rb +41 -0
- data/spec/simple_spreadsheet_xlsx_spec.rb +41 -0
- data/spec/spec_helper.rb +1 -0
- metadata +76 -11
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
simple-spreadsheet (0.0.4.alpha)
|
5
|
+
roo (= 1.10.1)
|
6
|
+
rubyXL (= 1.2.5)
|
7
|
+
spreadsheet (= 0.6.5.9)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: http://rubygems.org/
|
11
|
+
specs:
|
12
|
+
addressable (2.2.6)
|
13
|
+
choice (0.1.4)
|
14
|
+
diff-lcs (1.1.3)
|
15
|
+
faraday (0.7.5)
|
16
|
+
addressable (~> 2.2.6)
|
17
|
+
multipart-post (~> 1.1.3)
|
18
|
+
rack (>= 1.1.0, < 2)
|
19
|
+
google-spreadsheet-ruby (0.1.6)
|
20
|
+
nokogiri (>= 1.4.3.1)
|
21
|
+
oauth (>= 0.3.6)
|
22
|
+
oauth2 (>= 0.5.0)
|
23
|
+
log4r (1.1.9)
|
24
|
+
multi_json (1.0.4)
|
25
|
+
multipart-post (1.1.4)
|
26
|
+
nokogiri (1.5.0)
|
27
|
+
oauth (0.4.5)
|
28
|
+
oauth2 (0.5.1)
|
29
|
+
faraday (~> 0.7.4)
|
30
|
+
multi_json (~> 1.0.3)
|
31
|
+
rack (1.4.1)
|
32
|
+
roo (1.10.1)
|
33
|
+
choice (>= 0.1.4)
|
34
|
+
google-spreadsheet-ruby (>= 0.1.5)
|
35
|
+
nokogiri (>= 1.5.0)
|
36
|
+
rubyzip (>= 0.9.4)
|
37
|
+
spreadsheet (> 0.6.4)
|
38
|
+
todonotes (>= 0.1.0)
|
39
|
+
rspec (2.6.0)
|
40
|
+
rspec-core (~> 2.6.0)
|
41
|
+
rspec-expectations (~> 2.6.0)
|
42
|
+
rspec-mocks (~> 2.6.0)
|
43
|
+
rspec-core (2.6.4)
|
44
|
+
rspec-expectations (2.6.0)
|
45
|
+
diff-lcs (~> 1.1.2)
|
46
|
+
rspec-mocks (2.6.0)
|
47
|
+
ruby-ole (1.2.11.2)
|
48
|
+
rubyXL (1.2.5)
|
49
|
+
rubyzip (0.9.5)
|
50
|
+
spreadsheet (0.6.5.9)
|
51
|
+
ruby-ole (>= 1.0)
|
52
|
+
todonotes (0.1.0)
|
53
|
+
log4r
|
54
|
+
|
55
|
+
PLATFORMS
|
56
|
+
ruby
|
57
|
+
|
58
|
+
DEPENDENCIES
|
59
|
+
rspec (~> 2.6.0)
|
60
|
+
simple-spreadsheet!
|
data/README.md
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
# Simple Spreadsheet
|
2
|
+
|
3
|
+
Recently a wrote a module to import raw data from Excel-like files to database and export it in various formats. To accomplish this i have to use different gems with different usage patterns so I decide to wrap them in a single simple gem. This is a spreadsheet reader and writer that (will) supports common formats: CSV (.csv), Excel (.xls, .xlsx), Open-office (.ods) and Google (online).
|
4
|
+
|
5
|
+
Used gems:
|
6
|
+
|
7
|
+
- Roo (http://roo.rubyforge.org/)
|
8
|
+
- Spreadsheet (http://spreadsheet.ch/)
|
9
|
+
- RubyXL (https://github.com/gilt/rubyXL)
|
10
|
+
|
11
|
+
## Installing
|
12
|
+
|
13
|
+
Add to your Gemfile and run the `bundle` command to install it.
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
gem "simple-spreadsheet"
|
17
|
+
```
|
18
|
+
|
19
|
+
**N.B. Requires Ruby 1.9.2 or later.**
|
20
|
+
|
21
|
+
## Basic functionality
|
22
|
+
|
23
|
+
### Reading Spreadsheet
|
24
|
+
|
25
|
+
Example:
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
s = SimpleSpreadsheet::Workbook.read("my_spreadsheets_file.xls")
|
29
|
+
```
|
30
|
+
|
31
|
+
Supported formats:
|
32
|
+
|
33
|
+
<table>
|
34
|
+
<tr>
|
35
|
+
<th>Excel (.xls)</th>
|
36
|
+
<th>Excelx (.xlsx)</th>
|
37
|
+
<th>Openoffice (.ods)</th>
|
38
|
+
<th>CSV (.csv)</th>
|
39
|
+
<th>CSV Excel</th>
|
40
|
+
<th>CSV Tab Separated</th>
|
41
|
+
</tr>
|
42
|
+
<tr>
|
43
|
+
<td>Yes</td>
|
44
|
+
<td>Yes</td>
|
45
|
+
<td>Yes</td>
|
46
|
+
<td>Yes</td>
|
47
|
+
<td>Yes</td>
|
48
|
+
<td>Yes</td>
|
49
|
+
</tr>
|
50
|
+
</table>
|
51
|
+
|
52
|
+
|
53
|
+
## Recipes
|
54
|
+
|
55
|
+
### Get all data from some cols of first sheet of a XLS file
|
56
|
+
|
57
|
+
```ruby
|
58
|
+
s = SimpleSpreadsheet::Workbook.read("my_spreadsheets_file.xls")
|
59
|
+
s.select_worksheet = s.sheets.first
|
60
|
+
s.first_row.upto(@workbook.last_row) do |line|
|
61
|
+
data1 = s.cell(line, 1)
|
62
|
+
data2 = s.cell(line, 3)
|
63
|
+
end
|
64
|
+
```
|
65
|
+
|
66
|
+
### Get all data from some cols of first sheet of a XLS file (option 2)
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
s = SimpleSpreadsheet::Workbook.read("my_spreadsheets_file.xls")
|
70
|
+
s.first_row.upto(@workbook.last_row) do |line|
|
71
|
+
data1 = s.cell(line, 1, 1)
|
72
|
+
data2 = s.cell(line, 3, 1)
|
73
|
+
end
|
74
|
+
```
|
75
|
+
|
76
|
+
### Accessing CSV Excel (semicolon separated)
|
77
|
+
|
78
|
+
```ruby
|
79
|
+
s = SimpleSpreadsheet::Workbook.read("my_spreadsheets_file.csv", ".csvx")
|
80
|
+
```
|
81
|
+
|
82
|
+
### Accessing CSV Tab separated
|
83
|
+
|
84
|
+
```ruby
|
85
|
+
s = SimpleSpreadsheet::Workbook.read("my_spreadsheets_file.csv", ".csvt")
|
86
|
+
```
|
87
|
+
|
88
|
+
## Future plans
|
89
|
+
|
90
|
+
- Reading support for all formats
|
91
|
+
- More efficent reading for big spreadsheets (extending Roo)
|
92
|
+
- Writing support for all formats
|
93
|
+
- More reading functionalities
|
94
|
+
- Edit support fo all formats
|
data/Rakefile
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
require "simple_spreadsheet/version"
|
2
|
+
|
3
|
+
module SimpleSpreadsheet
|
4
|
+
|
5
|
+
class Workbook
|
6
|
+
|
7
|
+
def self.read(file, ext = nil)
|
8
|
+
ext = File.extname(file) if ext.nil?
|
9
|
+
case ext
|
10
|
+
when '.xls'
|
11
|
+
return ExcelReader.new(file)
|
12
|
+
when '.xlsx'
|
13
|
+
return ExcelxReader.new(file)
|
14
|
+
when '.ods'
|
15
|
+
return OpenofficeReader.new(file)
|
16
|
+
when '.csv'
|
17
|
+
return CsvReader.new(file)
|
18
|
+
when '.csvx'
|
19
|
+
return CsvxReader.new(file)
|
20
|
+
when '.csvt'
|
21
|
+
return CsvtReader.new(file)
|
22
|
+
else
|
23
|
+
return nil
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.edit(file, ext = nil)
|
28
|
+
ext = File.extname(file) if ext.nil?
|
29
|
+
case ext
|
30
|
+
when '.xls'
|
31
|
+
ExcelEditor.new(file)
|
32
|
+
when '.xlsx'
|
33
|
+
ExcelxEditor.new(file)
|
34
|
+
when '.ods'
|
35
|
+
OpenofficeEditor.new(file)
|
36
|
+
when '.csv'
|
37
|
+
CsvEditor.new(file)
|
38
|
+
when '.csvz'
|
39
|
+
return CsvzEditor.new(file)
|
40
|
+
when '.csvt'
|
41
|
+
return CsvtEditor.new(file)
|
42
|
+
else
|
43
|
+
return nil
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.write(file, ext = nil)
|
48
|
+
ext = File.extname(file) if ext.nil?
|
49
|
+
case ext
|
50
|
+
when '.xls'
|
51
|
+
ExcelWriter.new(file)
|
52
|
+
when '.xlsx'
|
53
|
+
ExcelxWriter.new(file)
|
54
|
+
when '.ods'
|
55
|
+
OpenofficeWriter.new(file)
|
56
|
+
when '.csv'
|
57
|
+
CsvWriter.new(file)
|
58
|
+
when '.csvz'
|
59
|
+
return CsvzWriter.new(file)
|
60
|
+
when '.csvt'
|
61
|
+
return CsvtWriter.new(file)
|
62
|
+
else
|
63
|
+
return nil
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
68
|
+
|
69
|
+
# General
|
70
|
+
require 'simple_spreadsheet/generic_sheet'
|
71
|
+
|
72
|
+
# Extendend classes
|
73
|
+
require 'simple_spreadsheet/classes/excel_extended'
|
74
|
+
require 'simple_spreadsheet/classes/csv_extended'
|
75
|
+
require 'simple_spreadsheet/classes/csvx_extended'
|
76
|
+
require 'simple_spreadsheet/classes/csvt_extended'
|
77
|
+
|
78
|
+
# General for mode
|
79
|
+
require 'simple_spreadsheet/readers/spreadsheet_reader'
|
80
|
+
require 'simple_spreadsheet/editors/spreadsheet_editor'
|
81
|
+
require 'simple_spreadsheet/writers/spreadsheet_writer'
|
82
|
+
|
83
|
+
# .xls (Excel 97-2003)
|
84
|
+
require 'simple_spreadsheet/readers/excel_reader'
|
85
|
+
require 'simple_spreadsheet/editors/excel_editor'
|
86
|
+
require 'simple_spreadsheet/writers/excel_writer'
|
87
|
+
|
88
|
+
# .xlsx (Excel 2007-2010)
|
89
|
+
require 'simple_spreadsheet/readers/excelx_reader'
|
90
|
+
require 'simple_spreadsheet/editors/excelx_editor'
|
91
|
+
require 'simple_spreadsheet/writers/excelx_writer'
|
92
|
+
|
93
|
+
# .ods (Openoffice)
|
94
|
+
require 'simple_spreadsheet/readers/openoffice_reader'
|
95
|
+
require 'simple_spreadsheet/editors/openoffice_editor'
|
96
|
+
require 'simple_spreadsheet/writers/openoffice_writer'
|
97
|
+
|
98
|
+
# .csv (CSV)
|
99
|
+
require 'simple_spreadsheet/readers/csv_reader'
|
100
|
+
require 'simple_spreadsheet/editors/csv_editor'
|
101
|
+
require 'simple_spreadsheet/writers/csv_writer'
|
102
|
+
|
103
|
+
# .csvx (CSV)
|
104
|
+
require 'simple_spreadsheet/readers/csvx_reader'
|
105
|
+
|
106
|
+
# .csvt (CSV)
|
107
|
+
require 'simple_spreadsheet/readers/csvt_reader'
|
108
|
+
|
109
|
+
|
110
|
+
end
|
111
|
+
|
112
|
+
# Gems
|
113
|
+
require 'roo'
|
114
|
+
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'roo/generic_spreadsheet'
|
2
|
+
require 'roo/csv'
|
3
|
+
|
4
|
+
class CsvExtended < Csv
|
5
|
+
# def read_cells(sheet=nil)
|
6
|
+
# sheet = @default_sheet unless sheet
|
7
|
+
# @cell_type = {} unless @cell_type
|
8
|
+
# @cell = {} unless @cell
|
9
|
+
# @first_row[sheet] = 1
|
10
|
+
# @last_row[sheet] = 0
|
11
|
+
# @first_column[sheet] = 1
|
12
|
+
# @last_column[sheet] = 1
|
13
|
+
# rownum = 1
|
14
|
+
# CSV.foreach(@filename) do |row|
|
15
|
+
# row.each_with_index do |elem,i|
|
16
|
+
# @cell[[rownum,i+1]] = cell_postprocessing rownum,i+1, elem
|
17
|
+
# @cell_type[[rownum,i+1]] = celltype_class @cell[[rownum,i+1]]
|
18
|
+
# if i+1 > @last_column[sheet]
|
19
|
+
# @last_column[sheet] += 1
|
20
|
+
# end
|
21
|
+
# end
|
22
|
+
# rownum += 1
|
23
|
+
# @last_row[sheet] += 1
|
24
|
+
# end
|
25
|
+
# @cells_read[sheet] = true
|
26
|
+
# #-- adjust @first_row if neccessary
|
27
|
+
# loop do
|
28
|
+
# if !row(@first_row[sheet]).any? and @first_row[sheet] < @last_row[sheet]
|
29
|
+
# @first_row[sheet] += 1
|
30
|
+
# else
|
31
|
+
# break
|
32
|
+
# end
|
33
|
+
# end
|
34
|
+
# #-- adjust @last_row if neccessary
|
35
|
+
# loop do
|
36
|
+
# if !row(@last_row[sheet]).any? and @last_row[sheet] and
|
37
|
+
# @last_row[sheet] > @first_row[sheet]
|
38
|
+
# @last_row[sheet] -= 1
|
39
|
+
# else
|
40
|
+
# break
|
41
|
+
# end
|
42
|
+
# end
|
43
|
+
# #-- adjust @first_column if neccessary
|
44
|
+
# loop do
|
45
|
+
# if !column(@first_column[sheet]).any? and
|
46
|
+
# @first_column[sheet] and
|
47
|
+
# @first_column[sheet] < @last_column[sheet]
|
48
|
+
# @first_column[sheet] += 1
|
49
|
+
# else
|
50
|
+
# break
|
51
|
+
# end
|
52
|
+
# end
|
53
|
+
# #-- adjust @last_column if neccessary
|
54
|
+
# loop do
|
55
|
+
# if !column(@last_column[sheet]).any? and
|
56
|
+
# @last_column[sheet] and
|
57
|
+
# @last_column[sheet] > @first_column[sheet]
|
58
|
+
# @last_column[sheet] -= 1
|
59
|
+
# else
|
60
|
+
# break
|
61
|
+
# end
|
62
|
+
# end
|
63
|
+
# end
|
64
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'roo/generic_spreadsheet'
|
2
|
+
require 'roo/csv'
|
3
|
+
|
4
|
+
class CsvtExtended < Csv
|
5
|
+
def read_cells(sheet=nil)
|
6
|
+
sheet = @default_sheet unless sheet
|
7
|
+
@cell_type = {} unless @cell_type
|
8
|
+
@cell = {} unless @cell
|
9
|
+
@first_row[sheet] = 1
|
10
|
+
@last_row[sheet] = 0
|
11
|
+
@first_column[sheet] = 1
|
12
|
+
@last_column[sheet] = 1
|
13
|
+
rownum = 1
|
14
|
+
CSV.foreach(@filename, {:col_sep => "\t"}) do |row|
|
15
|
+
row.each_with_index do |elem,i|
|
16
|
+
@cell[[rownum,i+1]] = cell_postprocessing rownum,i+1, elem
|
17
|
+
@cell_type[[rownum,i+1]] = celltype_class @cell[[rownum,i+1]]
|
18
|
+
if i+1 > @last_column[sheet]
|
19
|
+
@last_column[sheet] += 1
|
20
|
+
end
|
21
|
+
end
|
22
|
+
rownum += 1
|
23
|
+
@last_row[sheet] += 1
|
24
|
+
end
|
25
|
+
@cells_read[sheet] = true
|
26
|
+
#-- adjust @first_row if neccessary
|
27
|
+
loop do
|
28
|
+
if !row(@first_row[sheet]).any? and @first_row[sheet] < @last_row[sheet]
|
29
|
+
@first_row[sheet] += 1
|
30
|
+
else
|
31
|
+
break
|
32
|
+
end
|
33
|
+
end
|
34
|
+
#-- adjust @last_row if neccessary
|
35
|
+
loop do
|
36
|
+
if !row(@last_row[sheet]).any? and @last_row[sheet] and
|
37
|
+
@last_row[sheet] > @first_row[sheet]
|
38
|
+
@last_row[sheet] -= 1
|
39
|
+
else
|
40
|
+
break
|
41
|
+
end
|
42
|
+
end
|
43
|
+
#-- adjust @first_column if neccessary
|
44
|
+
loop do
|
45
|
+
if !column(@first_column[sheet]).any? and
|
46
|
+
@first_column[sheet] and
|
47
|
+
@first_column[sheet] < @last_column[sheet]
|
48
|
+
@first_column[sheet] += 1
|
49
|
+
else
|
50
|
+
break
|
51
|
+
end
|
52
|
+
end
|
53
|
+
#-- adjust @last_column if neccessary
|
54
|
+
loop do
|
55
|
+
if !column(@last_column[sheet]).any? and
|
56
|
+
@last_column[sheet] and
|
57
|
+
@last_column[sheet] > @first_column[sheet]
|
58
|
+
@last_column[sheet] -= 1
|
59
|
+
else
|
60
|
+
break
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'roo/generic_spreadsheet'
|
2
|
+
require 'roo/csv'
|
3
|
+
|
4
|
+
class CsvxExtended < Csv
|
5
|
+
def read_cells(sheet=nil)
|
6
|
+
sheet = @default_sheet unless sheet
|
7
|
+
@cell_type = {} unless @cell_type
|
8
|
+
@cell = {} unless @cell
|
9
|
+
@first_row[sheet] = 1
|
10
|
+
@last_row[sheet] = 0
|
11
|
+
@first_column[sheet] = 1
|
12
|
+
@last_column[sheet] = 1
|
13
|
+
rownum = 1
|
14
|
+
CSV.foreach(@filename, {:col_sep => ";"}) do |row|
|
15
|
+
row.each_with_index do |elem,i|
|
16
|
+
@cell[[rownum,i+1]] = cell_postprocessing rownum,i+1, elem
|
17
|
+
@cell_type[[rownum,i+1]] = celltype_class @cell[[rownum,i+1]]
|
18
|
+
if i+1 > @last_column[sheet]
|
19
|
+
@last_column[sheet] += 1
|
20
|
+
end
|
21
|
+
end
|
22
|
+
rownum += 1
|
23
|
+
@last_row[sheet] += 1
|
24
|
+
end
|
25
|
+
@cells_read[sheet] = true
|
26
|
+
#-- adjust @first_row if neccessary
|
27
|
+
loop do
|
28
|
+
if !row(@first_row[sheet]).any? and @first_row[sheet] < @last_row[sheet]
|
29
|
+
@first_row[sheet] += 1
|
30
|
+
else
|
31
|
+
break
|
32
|
+
end
|
33
|
+
end
|
34
|
+
#-- adjust @last_row if neccessary
|
35
|
+
loop do
|
36
|
+
if !row(@last_row[sheet]).any? and @last_row[sheet] and
|
37
|
+
@last_row[sheet] > @first_row[sheet]
|
38
|
+
@last_row[sheet] -= 1
|
39
|
+
else
|
40
|
+
break
|
41
|
+
end
|
42
|
+
end
|
43
|
+
#-- adjust @first_column if neccessary
|
44
|
+
loop do
|
45
|
+
if !column(@first_column[sheet]).any? and
|
46
|
+
@first_column[sheet] and
|
47
|
+
@first_column[sheet] < @last_column[sheet]
|
48
|
+
@first_column[sheet] += 1
|
49
|
+
else
|
50
|
+
break
|
51
|
+
end
|
52
|
+
end
|
53
|
+
#-- adjust @last_column if neccessary
|
54
|
+
loop do
|
55
|
+
if !column(@last_column[sheet]).any? and
|
56
|
+
@last_column[sheet] and
|
57
|
+
@last_column[sheet] > @first_column[sheet]
|
58
|
+
@last_column[sheet] -= 1
|
59
|
+
else
|
60
|
+
break
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'roo/generic_spreadsheet'
|
2
|
+
require 'roo/excel'
|
3
|
+
|
4
|
+
class ExcelExtended < Excel
|
5
|
+
# def read_cells(sheet=nil)
|
6
|
+
# sheet = @default_sheet unless sheet
|
7
|
+
# raise ArgumentError, "Error: sheet '#{sheet||'nil'}' not valid" if @default_sheet == nil and sheet==nil
|
8
|
+
# raise RangeError unless self.sheets.include? sheet
|
9
|
+
#
|
10
|
+
# if @cells_read[sheet]
|
11
|
+
# raise "sheet #{sheet} already read"
|
12
|
+
# end
|
13
|
+
#
|
14
|
+
# worksheet = @workbook.worksheet(sheet_no(sheet))
|
15
|
+
# row_index=1
|
16
|
+
# worksheet.each(0) do |row|
|
17
|
+
# (0..row.size).each do |cell_index|
|
18
|
+
# cell = row.at(cell_index)
|
19
|
+
# next if cell.nil? #skip empty cells
|
20
|
+
# next if cell.class == Spreadsheet::Formula && cell.value.nil? # skip empty formula cells
|
21
|
+
# if date_or_time?(row, cell_index)
|
22
|
+
# vt, v = read_cell_date_or_time(row, cell_index)
|
23
|
+
# else
|
24
|
+
# vt, v = read_cell(row, cell_index)
|
25
|
+
# end
|
26
|
+
# formula = tr = nil #TODO:???
|
27
|
+
# col_index = cell_index + 1
|
28
|
+
# font = row.format(cell_index).font
|
29
|
+
# font.extend(ExcelFontExtensions)
|
30
|
+
# set_cell_values(sheet,row_index,col_index,0,v,vt,formula,tr,font)
|
31
|
+
# end #row
|
32
|
+
# row_index += 1
|
33
|
+
# end # worksheet
|
34
|
+
# @cells_read[sheet] = true
|
35
|
+
# end
|
36
|
+
|
37
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module RooModule
|
2
|
+
|
3
|
+
def sheets
|
4
|
+
@engine.sheets
|
5
|
+
end
|
6
|
+
|
7
|
+
def default_sheet=(sheet)
|
8
|
+
if sheet.is_a? Integer
|
9
|
+
@engine.default_sheet = @engine.sheets[sheet - 1]
|
10
|
+
else
|
11
|
+
@engine.default_sheet = sheet
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def first_row
|
16
|
+
1
|
17
|
+
end
|
18
|
+
|
19
|
+
def last_row
|
20
|
+
@engine.last_row
|
21
|
+
end
|
22
|
+
|
23
|
+
def cell(row, col, sheet=nil)
|
24
|
+
if sheet.is_a? Integer
|
25
|
+
@engine.cell(row, col, @engine.sheets[sheet - 1])
|
26
|
+
else
|
27
|
+
@engine.cell(row, col, sheet)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def celltype(row, col, sheet=nil)
|
32
|
+
if sheet.is_a? Integer
|
33
|
+
@engine.celltype(row, col, @engine.sheets[sheet - 1])
|
34
|
+
else
|
35
|
+
@engine.celltype(row, col, sheet)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
class SpreadsheetReader < GenericSheet
|
2
|
+
|
3
|
+
def sheets
|
4
|
+
# return array of sheets manes
|
5
|
+
end
|
6
|
+
|
7
|
+
def default_sheet=(sheet)
|
8
|
+
# set default sheet
|
9
|
+
end
|
10
|
+
|
11
|
+
def first_row
|
12
|
+
# return first row index
|
13
|
+
end
|
14
|
+
|
15
|
+
def last_row
|
16
|
+
# return last row index
|
17
|
+
end
|
18
|
+
|
19
|
+
def cell(row, col, sheet=nil)
|
20
|
+
# return cell content
|
21
|
+
end
|
22
|
+
|
23
|
+
def celltype(row, col, sheet=nil)
|
24
|
+
# return cell type
|
25
|
+
end
|
26
|
+
|
27
|
+
def parse(&block)
|
28
|
+
# cicle on each line and execute block
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/simple_spreadsheet/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Andrea Mostosi"]
|
6
|
+
gem.email = ["andrea.mostosi@zenkay.net"]
|
7
|
+
gem.description = %q{Simple spreadsheet reader for common formats: Excel (.xls, .xlsx), Open-office (.ods) and some CSV (standard, excel, tab separated). Future versions: writing and more formats.}
|
8
|
+
gem.summary = %q{Read and write most common spreadsheet format}
|
9
|
+
gem.homepage = "https://github.com/zenkay/simple-spreadsheet"
|
10
|
+
|
11
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
12
|
+
gem.files = `git ls-files`.split("\n")
|
13
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
|
+
gem.name = "simple-spreadsheet"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = SimpleSpreadsheet::VERSION
|
17
|
+
|
18
|
+
# specify any dependencies here; for example:
|
19
|
+
gem.add_development_dependency "rspec", "~> 2.6.0"
|
20
|
+
gem.add_runtime_dependency "roo", "1.10.1"
|
21
|
+
gem.add_runtime_dependency "spreadsheet", "0.6.5.9"
|
22
|
+
gem.add_runtime_dependency "rubyXL", "1.2.5"
|
23
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
String1,1
|
@@ -0,0 +1 @@
|
|
1
|
+
String1 1
|
@@ -0,0 +1 @@
|
|
1
|
+
String1;1
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe SimpleSpreadsheet do
|
5
|
+
|
6
|
+
describe "Open CSV (.csv) file read-only mode" do
|
7
|
+
before do
|
8
|
+
@workbook = SimpleSpreadsheet::Workbook.read(File.join(File.dirname(__FILE__), "fixtures/file.csv"))
|
9
|
+
end
|
10
|
+
it "should can open the file" do
|
11
|
+
@workbook.should_not be_nil
|
12
|
+
end
|
13
|
+
it "should use right class" do
|
14
|
+
@workbook.class.to_s.should eq("CsvReader")
|
15
|
+
end
|
16
|
+
it "should see the right number of sheets" do
|
17
|
+
@workbook.sheets.count.should eq(1)
|
18
|
+
end
|
19
|
+
it "should read strings from first sheets" do
|
20
|
+
@workbook.cell(1,1).should eq("String1")
|
21
|
+
end
|
22
|
+
it "should read integer from first sheets" do
|
23
|
+
@workbook.cell(1,2).should eq("1")
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe SimpleSpreadsheet do
|
5
|
+
|
6
|
+
describe "Open CSV (.csvt) file read-only mode" do
|
7
|
+
before do
|
8
|
+
@workbook = SimpleSpreadsheet::Workbook.read(File.join(File.dirname(__FILE__), "fixtures/file.csvt"))
|
9
|
+
end
|
10
|
+
it "should can open the file" do
|
11
|
+
@workbook.should_not be_nil
|
12
|
+
end
|
13
|
+
it "should use right class" do
|
14
|
+
@workbook.class.to_s.should eq("CsvtReader")
|
15
|
+
end
|
16
|
+
it "should see the right number of sheets" do
|
17
|
+
@workbook.sheets.count.should eq(1)
|
18
|
+
end
|
19
|
+
it "should read strings from first sheets" do
|
20
|
+
@workbook.cell(1,1).should eq("String1")
|
21
|
+
end
|
22
|
+
it "should read integer from first sheets" do
|
23
|
+
@workbook.cell(1,2).should eq("1")
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe SimpleSpreadsheet do
|
5
|
+
|
6
|
+
describe "Open CSV (.csvx) file read-only mode" do
|
7
|
+
before do
|
8
|
+
@workbook = SimpleSpreadsheet::Workbook.read(File.join(File.dirname(__FILE__), "fixtures/file.csvx"), ".csvx")
|
9
|
+
end
|
10
|
+
it "should can open the file" do
|
11
|
+
@workbook.should_not be_nil
|
12
|
+
end
|
13
|
+
it "should use right class" do
|
14
|
+
@workbook.class.to_s.should eq("CsvxReader")
|
15
|
+
end
|
16
|
+
it "should see the right number of sheets" do
|
17
|
+
@workbook.sheets.count.should eq(1)
|
18
|
+
end
|
19
|
+
it "should read strings from first sheets" do
|
20
|
+
@workbook.cell(1,1).should eq("String1")
|
21
|
+
end
|
22
|
+
it "should read integer from first sheets" do
|
23
|
+
@workbook.cell(1,2).should eq("1")
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe SimpleSpreadsheet do
|
5
|
+
|
6
|
+
describe "Open Openoffice (.ods) file read-only mode" do
|
7
|
+
before do
|
8
|
+
@workbook = SimpleSpreadsheet::Workbook.read(File.join(File.dirname(__FILE__), "fixtures/file.ods"))
|
9
|
+
end
|
10
|
+
it "should can open the file" do
|
11
|
+
@workbook.should_not be_nil
|
12
|
+
end
|
13
|
+
it "should use right class" do
|
14
|
+
@workbook.class.to_s.should eq("OpenofficeReader")
|
15
|
+
end
|
16
|
+
it "should see the right number of sheets" do
|
17
|
+
@workbook.sheets.count.should eq(2)
|
18
|
+
end
|
19
|
+
it "should read strings from first sheets" do
|
20
|
+
@workbook.cell(1,1).should eq("String1")
|
21
|
+
end
|
22
|
+
it "should read integer from first sheets" do
|
23
|
+
@workbook.cell(1,2).should eq(1)
|
24
|
+
end
|
25
|
+
it "should read strings from other sheets" do
|
26
|
+
@workbook.cell(1, 1, 2).should eq("String2")
|
27
|
+
end
|
28
|
+
it "should read integer from other sheets" do
|
29
|
+
@workbook.cell(1, 2, 2).should eq(2)
|
30
|
+
end
|
31
|
+
it "should read strings from other sheets (way 2)" do
|
32
|
+
@workbook.default_sheet = 2
|
33
|
+
@workbook.cell(1, 1).should eq("String2")
|
34
|
+
end
|
35
|
+
it "should read integer from other sheets (way 2)" do
|
36
|
+
@workbook.default_sheet = 2
|
37
|
+
@workbook.cell(1, 2).should eq(2)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe SimpleSpreadsheet do
|
5
|
+
|
6
|
+
describe "Open Excel (.xls) file read-only mode" do
|
7
|
+
before do
|
8
|
+
@workbook = SimpleSpreadsheet::Workbook.read(File.join(File.dirname(__FILE__), "fixtures/file.xls"))
|
9
|
+
end
|
10
|
+
it "should can open the file" do
|
11
|
+
@workbook.should_not be_nil
|
12
|
+
end
|
13
|
+
it "should use right class" do
|
14
|
+
@workbook.class.to_s.should eq("ExcelReader")
|
15
|
+
end
|
16
|
+
it "should see the right number of sheets" do
|
17
|
+
@workbook.sheets.count.should eq(2)
|
18
|
+
end
|
19
|
+
it "should read strings from first sheets" do
|
20
|
+
@workbook.cell(1, 1).should eq("String1")
|
21
|
+
end
|
22
|
+
it "should read integer from first sheets" do
|
23
|
+
@workbook.cell(1, 2).should eq(1)
|
24
|
+
end
|
25
|
+
it "should read strings from other sheets" do
|
26
|
+
@workbook.cell(1, 1, 2).should eq("String2")
|
27
|
+
end
|
28
|
+
it "should read integer from other sheets" do
|
29
|
+
@workbook.cell(1, 2, 2).should eq(2)
|
30
|
+
end
|
31
|
+
it "should read strings from other sheets (way 2)" do
|
32
|
+
@workbook.default_sheet = 2
|
33
|
+
@workbook.cell(1, 1).should eq("String2")
|
34
|
+
end
|
35
|
+
it "should read integer from other sheets (way 2)" do
|
36
|
+
@workbook.default_sheet = 2
|
37
|
+
@workbook.cell(1, 2).should eq(2)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe SimpleSpreadsheet do
|
5
|
+
|
6
|
+
describe "Open Excelx (.xlsx) file read-only mode" do
|
7
|
+
before do
|
8
|
+
@workbook = SimpleSpreadsheet::Workbook.read(File.join(File.dirname(__FILE__), "fixtures/file.xlsx"))
|
9
|
+
end
|
10
|
+
it "should can open the file" do
|
11
|
+
@workbook.should_not be_nil
|
12
|
+
end
|
13
|
+
it "should use right class" do
|
14
|
+
@workbook.class.to_s.should eq("ExcelxReader")
|
15
|
+
end
|
16
|
+
it "should see the right number of sheets" do
|
17
|
+
@workbook.sheets.count.should eq(2)
|
18
|
+
end
|
19
|
+
it "should read strings from first sheets" do
|
20
|
+
@workbook.cell(1,1).should eq("String1")
|
21
|
+
end
|
22
|
+
it "should read integer from first sheets" do
|
23
|
+
@workbook.cell(1,2).should eq(1)
|
24
|
+
end
|
25
|
+
it "should read strings from other sheets" do
|
26
|
+
@workbook.cell(1, 1, 2).should eq("String2")
|
27
|
+
end
|
28
|
+
it "should read integer from other sheets" do
|
29
|
+
@workbook.cell(1, 2, 2).should eq(2)
|
30
|
+
end
|
31
|
+
it "should read strings from other sheets (way 2)" do
|
32
|
+
@workbook.default_sheet = 2
|
33
|
+
@workbook.cell(1, 1).should eq("String2")
|
34
|
+
end
|
35
|
+
it "should read integer from other sheets (way 2)" do
|
36
|
+
@workbook.default_sheet = 2
|
37
|
+
@workbook.cell(1, 2).should eq(2)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'simple-spreadsheet'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple-spreadsheet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.5
|
4
|
+
version: 0.0.5.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-04-03 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70314673199160 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 2.6.0
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70314673199160
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: roo
|
27
|
-
requirement: &
|
27
|
+
requirement: &70314673198580 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - =
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.10.1
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70314673198580
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: spreadsheet
|
38
|
-
requirement: &
|
38
|
+
requirement: &70314673198100 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - =
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 0.6.5.9
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70314673198100
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rubyXL
|
49
|
-
requirement: &
|
49
|
+
requirement: &70314673197640 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - =
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: 1.2.5
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70314673197640
|
58
58
|
description: ! 'Simple spreadsheet reader for common formats: Excel (.xls, .xlsx),
|
59
59
|
Open-office (.ods) and some CSV (standard, excel, tab separated). Future versions:
|
60
60
|
writing and more formats.'
|
@@ -63,7 +63,58 @@ email:
|
|
63
63
|
executables: []
|
64
64
|
extensions: []
|
65
65
|
extra_rdoc_files: []
|
66
|
-
files:
|
66
|
+
files:
|
67
|
+
- .gitignore
|
68
|
+
- .rspec
|
69
|
+
- Gemfile
|
70
|
+
- Gemfile.lock
|
71
|
+
- README.md
|
72
|
+
- Rakefile
|
73
|
+
- lib/simple_spreadsheet.rb
|
74
|
+
- lib/simple_spreadsheet/classes/csv_extended.rb
|
75
|
+
- lib/simple_spreadsheet/classes/csvt_extended.rb
|
76
|
+
- lib/simple_spreadsheet/classes/csvx_extended.rb
|
77
|
+
- lib/simple_spreadsheet/classes/excel_extended.rb
|
78
|
+
- lib/simple_spreadsheet/editors/csv_editor.rb
|
79
|
+
- lib/simple_spreadsheet/editors/excel_editor.rb
|
80
|
+
- lib/simple_spreadsheet/editors/excelx_editor.rb
|
81
|
+
- lib/simple_spreadsheet/editors/excelxml_editor.rb
|
82
|
+
- lib/simple_spreadsheet/editors/google_editor.rb
|
83
|
+
- lib/simple_spreadsheet/editors/openoffice_editor.rb
|
84
|
+
- lib/simple_spreadsheet/editors/spreadsheet_editor.rb
|
85
|
+
- lib/simple_spreadsheet/exceptions.rb
|
86
|
+
- lib/simple_spreadsheet/generic_sheet.rb
|
87
|
+
- lib/simple_spreadsheet/modules/roo_module.rb
|
88
|
+
- lib/simple_spreadsheet/readers/csv_reader.rb
|
89
|
+
- lib/simple_spreadsheet/readers/csvt_reader.rb
|
90
|
+
- lib/simple_spreadsheet/readers/csvx_reader.rb
|
91
|
+
- lib/simple_spreadsheet/readers/excel_reader.rb
|
92
|
+
- lib/simple_spreadsheet/readers/excelx_reader.rb
|
93
|
+
- lib/simple_spreadsheet/readers/openoffice_reader.rb
|
94
|
+
- lib/simple_spreadsheet/readers/spreadsheet_reader.rb
|
95
|
+
- lib/simple_spreadsheet/version.rb
|
96
|
+
- lib/simple_spreadsheet/writers/csv_writer.rb
|
97
|
+
- lib/simple_spreadsheet/writers/excel_writer.rb
|
98
|
+
- lib/simple_spreadsheet/writers/excelx_writer.rb
|
99
|
+
- lib/simple_spreadsheet/writers/excelxml_writer.rb
|
100
|
+
- lib/simple_spreadsheet/writers/google_writer.rb
|
101
|
+
- lib/simple_spreadsheet/writers/openoffice_writer.rb
|
102
|
+
- lib/simple_spreadsheet/writers/spreadsheet_writer.rb
|
103
|
+
- simple_spreadsheet.gemspec
|
104
|
+
- spec/fixtures/file.csv
|
105
|
+
- spec/fixtures/file.csvt
|
106
|
+
- spec/fixtures/file.csvx
|
107
|
+
- spec/fixtures/file.ods
|
108
|
+
- spec/fixtures/file.xls
|
109
|
+
- spec/fixtures/file.xlsx
|
110
|
+
- spec/simple_spreadsheet_csv_spec.rb
|
111
|
+
- spec/simple_spreadsheet_csvt_spec.rb
|
112
|
+
- spec/simple_spreadsheet_csvx_spec.rb
|
113
|
+
- spec/simple_spreadsheet_ods_spec.rb
|
114
|
+
- spec/simple_spreadsheet_spec.rb
|
115
|
+
- spec/simple_spreadsheet_xls_spec.rb
|
116
|
+
- spec/simple_spreadsheet_xlsx_spec.rb
|
117
|
+
- spec/spec_helper.rb
|
67
118
|
homepage: https://github.com/zenkay/simple-spreadsheet
|
68
119
|
licenses: []
|
69
120
|
post_install_message:
|
@@ -88,4 +139,18 @@ rubygems_version: 1.8.6
|
|
88
139
|
signing_key:
|
89
140
|
specification_version: 3
|
90
141
|
summary: Read and write most common spreadsheet format
|
91
|
-
test_files:
|
142
|
+
test_files:
|
143
|
+
- spec/fixtures/file.csv
|
144
|
+
- spec/fixtures/file.csvt
|
145
|
+
- spec/fixtures/file.csvx
|
146
|
+
- spec/fixtures/file.ods
|
147
|
+
- spec/fixtures/file.xls
|
148
|
+
- spec/fixtures/file.xlsx
|
149
|
+
- spec/simple_spreadsheet_csv_spec.rb
|
150
|
+
- spec/simple_spreadsheet_csvt_spec.rb
|
151
|
+
- spec/simple_spreadsheet_csvx_spec.rb
|
152
|
+
- spec/simple_spreadsheet_ods_spec.rb
|
153
|
+
- spec/simple_spreadsheet_spec.rb
|
154
|
+
- spec/simple_spreadsheet_xls_spec.rb
|
155
|
+
- spec/simple_spreadsheet_xlsx_spec.rb
|
156
|
+
- spec/spec_helper.rb
|