simple-spreadsheet-extractor 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,7 +1,7 @@
1
1
  = Simple Spreadsheet Extractor
2
2
 
3
3
  Authors:: Stuart Owen, Finn Bacall
4
- Version:: 0.5.0
4
+ Version:: 0.6.0
5
5
  Contact:: mailto:stuart.owen@manchester.ac.uk
6
6
  Licence:: BSD (See LICENCE or http://www.opensource.org/licenses/bsd-license.php)
7
7
  Copyright:: (c) 2010 The University of Manchester, UK
@@ -73,48 +73,67 @@ e.g.
73
73
 
74
74
  <?xml version="1.0" encoding="UTF-8"?>
75
75
  <workbook xmlns="http://www.sysmo-db.org/2010/xml/spreadsheet">
76
- <sheet name="Sheet1" index="1" hidden="false" very_hidden="false" first_row="2" last_row="8">
77
- <row index="2">
78
- <cell column="2" column_alpha="B" row="2" type="string">test2</cell>
79
- <cell column="3" column_alpha="C" row="2" type="string">test</cell>
80
- <cell column="4" column_alpha="D" row="2" type="string">test3</cell>
81
- </row>
82
-
83
- <row index="3">
84
- <cell column="2" column_alpha="B" row="3" type="string">a</cell>
85
- <cell column="3" column_alpha="C" row="3" type="numeric">1.0</cell>
86
- <cell column="4" column_alpha="D" row="3" type="numeric">22.0</cell>
87
- </row>
88
- <row index="4">
89
- <cell column="2" column_alpha="B" row="4" type="string">b</cell>
90
-
91
- <cell column="3" column_alpha="C" row="4" type="numeric">2.0</cell>
92
- <cell column="4" column_alpha="D" row="4" type="numeric">5.0</cell>
93
- </row>
94
- <row index="5">
95
- <cell column="2" column_alpha="B" row="5" type="string">c</cell>
96
- <cell column="3" column_alpha="C" row="5" type="numeric">3.0</cell>
97
- <cell column="4" column_alpha="D" row="5" type="numeric">1.0</cell>
98
-
99
- </row>
100
- <row index="6">
101
- <cell column="2" column_alpha="B" row="6" type="string">d</cell>
102
- <cell column="3" column_alpha="C" row="6" type="numeric">4.0</cell>
103
- <cell column="4" column_alpha="D" row="6" type="numeric">5.0</cell>
104
- </row>
105
- <row index="7">
106
-
107
- <cell column="2" column_alpha="B" row="7" type="string">e</cell>
108
- <cell column="3" column_alpha="C" row="7" type="numeric">5.0</cell>
109
- <cell column="4" column_alpha="D" row="7" type="numeric">6.0</cell>
110
- </row>
111
- <row index="8">
112
- <cell column="2" column_alpha="B" row="8" type="string">total</cell>
113
- <cell column="3" column_alpha="C" row="8" type="numeric" formula="SUM(C3:C7)">15.0</cell>
114
-
115
- <cell column="4" column_alpha="D" row="8" type="numeric" formula="SUM(D3:D7)">39.0</cell>
116
- </row>
76
+ <styles>
77
+ <style id="style21">
78
+ <border-top>dotted 1pt</border-top>
79
+ <border-bottom>dotted 1pt</border-bottom>
80
+ <border-left>dotted 1pt</border-left>
81
+ <border-right>dotted 1pt</border-right>
82
+ <background-color>#ffcc99</background-color>
83
+ </style>
84
+ <style id="style22">
85
+ <border-top>dotted 1pt</border-top>
86
+ <border-bottom>dotted 1pt</border-bottom>
87
+ <border-left>dotted 1pt</border-left>
88
+ <border-right>dotted 1pt</border-right>
89
+ <font-weight>bold</font-weight>
90
+ <font-style>italics</font-style>
91
+ <text-decoration>underline</text-decoration>
92
+ </style>
93
+ <style id="style23">
94
+ <color>#2323dc</color>
95
+ </style>
96
+ </styles>
97
+ <sheet name="Sheet1" index="1" hidden="false" very_hidden="false">
98
+ <columns first_column="1" last_column="3">
99
+ <column index="1" column_alpha="A" width="2048"/>
100
+ <column index="2" column_alpha="B" width="2048"/>
101
+ <column index="3" column_alpha="C" width="2048"/>
102
+ </columns>
103
+ <rows first_row="1" last_row="6">
104
+ <row index="1">
105
+ <cell column="1" column_alpha="A" row="1" type="numeric">13.0</cell>
106
+ <cell column="2" column_alpha="B" row="1" type="numeric">654153.0</cell>
107
+ <cell column="27" column_alpha="AA" row="1" type="string">AA</cell>
108
+ <cell column="28" column_alpha="AB" row="1" type="string">AB</cell>
109
+ <cell column="53" column_alpha="BA" row="1" type="string">BA</cell>
110
+ <cell column="54" column_alpha="BB" row="1" type="string">BB</cell>
111
+ <cell column="55" column_alpha="BC" row="1" type="string">BC</cell>
112
+ </row>
113
+ <row index="2">
114
+ <cell column="1" column_alpha="A" row="2" type="numeric" style="style21">547654.0</cell>
115
+ </row>
116
+ <row index="3">
117
+ <cell column="1" column_alpha="A" row="3" type="numeric">45465.0</cell>
118
+ </row>
119
+ <row index="4" height="14.05pt">
120
+ <cell column="1" column_alpha="A" row="4" type="numeric" style="style22" formula="A1+1">14.0</cell>
121
+ </row>
122
+ <row index="6">
123
+ <cell column="1" column_alpha="A" row="6" type="datetime" style="style23" formula="DATE(2009,6,15)">2009-06-15T0:0:0+0100</cell>
124
+ </row>
125
+ </rows>
126
+ </sheet>
127
+ <sheet name="Sheet2" index="2" hidden="false" very_hidden="false">
128
+ <columns first_column="1" last_column="1">
129
+ <column index="1" column_alpha="A" width="2048"/>
130
+ </columns>
131
+ <rows first_row="1" last_row="1"/>
132
+ </sheet>
133
+ <sheet name="Sheet3" index="3" hidden="false" very_hidden="false">
134
+ <columns first_column="1" last_column="1">
135
+ <column index="1" column_alpha="A" width="2048"/>
136
+ </columns>
137
+ <rows first_row="1" last_row="1"/>
117
138
  </sheet>
118
- <sheet name="Sheet2" index="2" hidden="false" very_hidden="false" first_row="1" last_row="1"/>
119
- <sheet name="Sheet3" index="3" hidden="false" very_hidden="false" first_row="1" last_row="1"/>
120
- </workbook>
139
+ </workbook>
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ begin
12
12
  Jeweler::Tasks.new do |gemspec|
13
13
  gemspec.name = "simple-spreadsheet-extractor"
14
14
  gemspec.summary = "Basic spreadsheet content extraction using Apache POI"
15
- gemspec.description = "Takes a stream to a spreadsheet file and produces and XML representation of its contents"
15
+ gemspec.description = "Takes a stream to a spreadsheet file and produces an XML or CSV representation of its contents"
16
16
  gemspec.email = "stuart.owen@manchester.ac.uk"
17
17
  gemspec.homepage = "http://github.com/myGrid/simple-spreadsheet-extractor-gem"
18
18
  gemspec.authors = ["Stuart Owen","Finn Bacall"]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.6.0
data/doc/schema-v1.xsd CHANGED
@@ -53,8 +53,8 @@
53
53
  <xsd:sequence>
54
54
  <xsd:element name="columns" type="Columns" minOccurs="1"
55
55
  maxOccurs="1" />
56
- <xsd:element name="row" type="Row" minOccurs="0"
57
- maxOccurs="unbounded" />
56
+ <xsd:element name="rows" type="Rows" minOccurs="1"
57
+ maxOccurs="1" />
58
58
  </xsd:sequence>
59
59
  <xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>
60
60
  <xsd:attribute name="index" type="xsd:positiveInteger"
@@ -62,10 +62,6 @@
62
62
  <xsd:attribute name="hidden" type="xsd:boolean" use="required"></xsd:attribute>
63
63
  <xsd:attribute name="very_hidden" type="xsd:boolean"
64
64
  use="required"></xsd:attribute>
65
- <xsd:attribute name="first_row" type="xsd:positiveInteger"
66
- use="required"></xsd:attribute>
67
- <xsd:attribute name="last_row" type="xsd:positiveInteger"
68
- use="required"></xsd:attribute>
69
65
  </xsd:complexType>
70
66
 
71
67
  <xsd:complexType name="Columns">
@@ -87,6 +83,17 @@
87
83
  <xsd:attribute name="width" type="xsd:positiveInteger"
88
84
  use="optional"></xsd:attribute>
89
85
  </xsd:complexType>
86
+
87
+ <xsd:complexType name="Rows">
88
+ <xsd:sequence>
89
+ <xsd:element name="row" type="Row" minOccurs="0"
90
+ maxOccurs="unbounded" />
91
+ </xsd:sequence>
92
+ <xsd:attribute name="first_row" type="xsd:positiveInteger"
93
+ use="required"></xsd:attribute>
94
+ <xsd:attribute name="last_row" type="xsd:positiveInteger"
95
+ use="required"></xsd:attribute>
96
+ </xsd:complexType>
90
97
 
91
98
  <xsd:complexType name="Row">
92
99
  <xsd:sequence>
@@ -9,8 +9,8 @@ module SysMODB
9
9
  end
10
10
 
11
11
  module SpreadsheetExtractor
12
-
13
- DEFAULT_PATH = File.dirname(__FILE__) + "/../jars/simple-spreadsheet-extractor-0.5.0.jar"
12
+ JAR_VERSION="0.6.0"
13
+ DEFAULT_PATH = File.dirname(__FILE__) + "/../jars/simple-spreadsheet-extractor-#{JAR_VERSION}.jar"
14
14
 
15
15
  def spreadsheet_to_xml spreadsheet_data
16
16
  if is_windows?
@@ -5,12 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{simple-spreadsheet-extractor}
8
- s.version = "0.5.0"
8
+ s.version = "0.6.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Stuart Owen", "Finn Bacall"]
12
- s.date = %q{2011-03-03}
13
- s.description = %q{Takes a stream to a spreadsheet file and produces and XML representation of its contents}
12
+ s.date = %q{2011-06-09}
13
+ s.description = %q{Takes a stream to a spreadsheet file and produces an XML or CSV representation of its contents}
14
14
  s.email = %q{stuart.owen@manchester.ac.uk}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENCE",
@@ -28,7 +28,6 @@ Gem::Specification.new do |s|
28
28
  "jars/lib/poi-ooxml-3.7.jar",
29
29
  "jars/lib/poi-ooxml-schemas-3.7.jar",
30
30
  "jars/lib/xmlbeans-2.3.0.jar",
31
- "jars/simple-spreadsheet-extractor-0.5.0.jar",
32
31
  "lib/simple-spreadsheet-extractor.rb",
33
32
  "simple-spreadsheet-extractor.gemspec"
34
33
  ]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-spreadsheet-extractor
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 5
8
+ - 6
9
9
  - 0
10
- version: 0.5.0
10
+ version: 0.6.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stuart Owen
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-03-03 00:00:00 +00:00
19
+ date: 2011-06-16 00:00:00 +01:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -51,7 +51,7 @@ dependencies:
51
51
  version: 1.0.1
52
52
  type: :runtime
53
53
  version_requirements: *id002
54
- description: Takes a stream to a spreadsheet file and produces and XML representation of its contents
54
+ description: Takes a stream to a spreadsheet file and produces an XML or CSV representation of its contents
55
55
  email: stuart.owen@manchester.ac.uk
56
56
  executables: []
57
57
 
@@ -72,7 +72,7 @@ files:
72
72
  - jars/lib/poi-ooxml-3.7.jar
73
73
  - jars/lib/poi-ooxml-schemas-3.7.jar
74
74
  - jars/lib/xmlbeans-2.3.0.jar
75
- - jars/simple-spreadsheet-extractor-0.5.0.jar
75
+ - jars/simple-spreadsheet-extractor-0.6.0.jar
76
76
  - lib/simple-spreadsheet-extractor.rb
77
77
  - simple-spreadsheet-extractor.gemspec
78
78
  - test/test_extraction.rb