simple-spreadsheet-extractor 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc
CHANGED
@@ -11,7 +11,7 @@ Copyright:: (c) 2010 The University of Manchester, UK
|
|
11
11
|
|
12
12
|
This is a simple gem that provides a facility to read an XLS or XLSX Excel spreadsheet document and produce an XML representation of its content.
|
13
13
|
|
14
|
-
Internally it uses Apache POI, using the sister
|
14
|
+
Internally it uses Apache POI, using the sister http://github.com/myGrid/simple-spreadsheet-extractor tool.
|
15
15
|
|
16
16
|
This is a simple tool developed for use within SysMO-DB[http://www.sysmo-db.org].
|
17
17
|
|
@@ -19,7 +19,7 @@ This is a simple tool developed for use within SysMO-DB[http://www.sysmo-db.org]
|
|
19
19
|
|
20
20
|
Java 1.6 (JRE) is required.
|
21
21
|
|
22
|
-
|
22
|
+
gem install simple-spreadsheet-extractor
|
23
23
|
|
24
24
|
== Usage
|
25
25
|
|
@@ -40,4 +40,37 @@ e.g.
|
|
40
40
|
puts spreadsheet_to_xml f
|
41
41
|
rescue SysMODB::SpreadsheetExtractionException=>e
|
42
42
|
puts "Something went wrong #{e.message}"
|
43
|
-
end
|
43
|
+
end
|
44
|
+
|
45
|
+
Formulas are evaluated placing the result in the XML produced for that cell, however the original formula is included as an attribute.
|
46
|
+
|
47
|
+
Row and column indexes start at 1, rather than 0, to keep consistent with namings of the cells in Excel.
|
48
|
+
|
49
|
+
An XSD schema for the XML is available in doc/schema-v1.xsd
|
50
|
+
|
51
|
+
== Example XML
|
52
|
+
|
53
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
54
|
+
<workbook xmlns="http://www.sysmo-db.org/2010/xml/spreadsheet">
|
55
|
+
<sheet name="Sheet1" index="1" hidden="false" very_hidden="false" first_row="1" last_row="5">
|
56
|
+
<row index="1">
|
57
|
+
<cell column="1" column_alpha="A" row="1" type="numeric">12.0</cell>
|
58
|
+
<cell column="2" column_alpha="B" row="1" type="numeric">654153.0</cell>
|
59
|
+
<cell column="27" column_alpha="AA" row="1" type="string">AA</cell>
|
60
|
+
</row>
|
61
|
+
<row index="2">
|
62
|
+
<cell column="1" column_alpha="A" row="2" type="numeric">547654.0</cell>
|
63
|
+
</row>
|
64
|
+
<row index="3">
|
65
|
+
<cell column="1" column_alpha="A" row="3" type="numeric">45465.0</cell>
|
66
|
+
</row>
|
67
|
+
<row index="4">
|
68
|
+
<cell column="1" column_alpha="A" row="4" type="numeric" formula="A1+1">13.0</cell>
|
69
|
+
</row>
|
70
|
+
<row index="5">
|
71
|
+
<cell column="1" column_alpha="A" row="5" type="numeric" formula="SUM(A1:A4)">593144.0</cell>
|
72
|
+
</row>
|
73
|
+
</sheet>
|
74
|
+
<sheet name="Sheet2" index="2" hidden="false" very_hidden="false" first_row="1" last_row="1"/>
|
75
|
+
<sheet name="Sheet3" index="3" hidden="false" very_hidden="false" first_row="1" last_row="1"/>
|
76
|
+
</workbook>
|
Binary file
|
@@ -11,7 +11,7 @@ module SysMODB
|
|
11
11
|
JAR_PATH = File.dirname(__FILE__) + "/../jars"
|
12
12
|
|
13
13
|
def spreadsheet_to_xml spreadsheet_data
|
14
|
-
command = "java -jar #{JAR_PATH}/simple-spreadsheet-extractor-0.
|
14
|
+
command = "java -jar #{JAR_PATH}/simple-spreadsheet-extractor-0.3.jar"
|
15
15
|
output = ""
|
16
16
|
err_message = ""
|
17
17
|
status = Open4::popen4(command) do |pid, stdin, stdout, stderr|
|
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:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
- 2
|
9
8
|
- 3
|
10
|
-
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Stuart Owen
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-07-
|
18
|
+
date: 2010-07-26 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -50,7 +50,7 @@ files:
|
|
50
50
|
- jars/lib/xmlbeans-2.3.0.jar
|
51
51
|
- jars/lib/dom4j-1.6.1.jar
|
52
52
|
- jars/lib/poi-ooxml-3.6.jar
|
53
|
-
- jars/simple-spreadsheet-extractor-0.
|
53
|
+
- jars/simple-spreadsheet-extractor-0.3.jar
|
54
54
|
- README.rdoc
|
55
55
|
- LICENCE
|
56
56
|
has_rdoc: true
|
Binary file
|