roo 1.13.2 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +17 -0
  3. data/.github/ISSUE_TEMPLATE +10 -0
  4. data/.gitignore +11 -0
  5. data/.simplecov +4 -0
  6. data/.travis.yml +17 -0
  7. data/CHANGELOG.md +626 -0
  8. data/Gemfile +17 -12
  9. data/Gemfile_ruby2 +30 -0
  10. data/Guardfile +23 -0
  11. data/LICENSE +3 -1
  12. data/README.md +285 -0
  13. data/Rakefile +23 -23
  14. data/examples/roo_soap_client.rb +28 -31
  15. data/examples/roo_soap_server.rb +4 -6
  16. data/examples/write_me.rb +9 -10
  17. data/lib/roo/base.rb +298 -495
  18. data/lib/roo/constants.rb +5 -0
  19. data/lib/roo/csv.rb +127 -113
  20. data/lib/roo/errors.rb +11 -0
  21. data/lib/roo/excelx/cell/base.rb +94 -0
  22. data/lib/roo/excelx/cell/boolean.rb +27 -0
  23. data/lib/roo/excelx/cell/date.rb +28 -0
  24. data/lib/roo/excelx/cell/datetime.rb +111 -0
  25. data/lib/roo/excelx/cell/empty.rb +19 -0
  26. data/lib/roo/excelx/cell/number.rb +87 -0
  27. data/lib/roo/excelx/cell/string.rb +19 -0
  28. data/lib/roo/excelx/cell/time.rb +43 -0
  29. data/lib/roo/excelx/cell.rb +106 -0
  30. data/lib/roo/excelx/comments.rb +55 -0
  31. data/lib/roo/excelx/coordinate.rb +12 -0
  32. data/lib/roo/excelx/extractor.rb +21 -0
  33. data/lib/roo/excelx/format.rb +64 -0
  34. data/lib/roo/excelx/relationships.rb +25 -0
  35. data/lib/roo/excelx/shared.rb +32 -0
  36. data/lib/roo/excelx/shared_strings.rb +157 -0
  37. data/lib/roo/excelx/sheet.rb +112 -0
  38. data/lib/roo/excelx/sheet_doc.rb +211 -0
  39. data/lib/roo/excelx/styles.rb +64 -0
  40. data/lib/roo/excelx/workbook.rb +59 -0
  41. data/lib/roo/excelx.rb +376 -602
  42. data/lib/roo/font.rb +17 -0
  43. data/lib/roo/formatters/base.rb +15 -0
  44. data/lib/roo/formatters/csv.rb +84 -0
  45. data/lib/roo/formatters/matrix.rb +23 -0
  46. data/lib/roo/formatters/xml.rb +31 -0
  47. data/lib/roo/formatters/yaml.rb +40 -0
  48. data/lib/roo/libre_office.rb +4 -0
  49. data/lib/roo/link.rb +34 -0
  50. data/lib/roo/open_office.rb +626 -0
  51. data/lib/roo/spreadsheet.rb +22 -23
  52. data/lib/roo/tempdir.rb +21 -0
  53. data/lib/roo/utils.rb +78 -0
  54. data/lib/roo/version.rb +3 -0
  55. data/lib/roo.rb +23 -24
  56. data/roo.gemspec +21 -204
  57. data/spec/helpers.rb +5 -0
  58. data/spec/lib/roo/base_spec.rb +229 -3
  59. data/spec/lib/roo/csv_spec.rb +38 -11
  60. data/spec/lib/roo/excelx/format_spec.rb +7 -6
  61. data/spec/lib/roo/excelx_spec.rb +510 -11
  62. data/spec/lib/roo/libreoffice_spec.rb +16 -6
  63. data/spec/lib/roo/openoffice_spec.rb +30 -8
  64. data/spec/lib/roo/spreadsheet_spec.rb +60 -12
  65. data/spec/lib/roo/utils_spec.rb +106 -0
  66. data/spec/spec_helper.rb +7 -6
  67. data/test/all_ss.rb +12 -11
  68. data/test/excelx/cell/test_base.rb +63 -0
  69. data/test/excelx/cell/test_boolean.rb +36 -0
  70. data/test/excelx/cell/test_date.rb +38 -0
  71. data/test/excelx/cell/test_datetime.rb +45 -0
  72. data/test/excelx/cell/test_empty.rb +7 -0
  73. data/test/excelx/cell/test_number.rb +74 -0
  74. data/test/excelx/cell/test_string.rb +28 -0
  75. data/test/excelx/cell/test_time.rb +30 -0
  76. data/test/formatters/test_csv.rb +119 -0
  77. data/test/formatters/test_matrix.rb +76 -0
  78. data/test/formatters/test_xml.rb +74 -0
  79. data/test/formatters/test_yaml.rb +20 -0
  80. data/test/roo/test_csv.rb +52 -0
  81. data/test/roo/test_excelx.rb +186 -0
  82. data/test/roo/test_libre_office.rb +9 -0
  83. data/test/roo/test_open_office.rb +126 -0
  84. data/test/test_helper.rb +73 -53
  85. data/test/test_roo.rb +1211 -2292
  86. metadata +119 -298
  87. data/CHANGELOG +0 -417
  88. data/Gemfile.lock +0 -78
  89. data/README.markdown +0 -126
  90. data/VERSION +0 -1
  91. data/lib/roo/excel.rb +0 -355
  92. data/lib/roo/excel2003xml.rb +0 -300
  93. data/lib/roo/google.rb +0 -292
  94. data/lib/roo/openoffice.rb +0 -496
  95. data/lib/roo/roo_rails_helper.rb +0 -83
  96. data/lib/roo/worksheet.rb +0 -18
  97. data/scripts/txt2html +0 -67
  98. data/spec/lib/roo/excel2003xml_spec.rb +0 -15
  99. data/spec/lib/roo/excel_spec.rb +0 -17
  100. data/spec/lib/roo/google_spec.rb +0 -64
  101. data/test/files/1900_base.xls +0 -0
  102. data/test/files/1900_base.xlsx +0 -0
  103. data/test/files/1904_base.xls +0 -0
  104. data/test/files/1904_base.xlsx +0 -0
  105. data/test/files/Bibelbund.csv +0 -3741
  106. data/test/files/Bibelbund.ods +0 -0
  107. data/test/files/Bibelbund.xls +0 -0
  108. data/test/files/Bibelbund.xlsx +0 -0
  109. data/test/files/Bibelbund.xml +0 -62518
  110. data/test/files/Bibelbund1.ods +0 -0
  111. data/test/files/Pfand_from_windows_phone.xlsx +0 -0
  112. data/test/files/bad_excel_date.xls +0 -0
  113. data/test/files/bbu.ods +0 -0
  114. data/test/files/bbu.xls +0 -0
  115. data/test/files/bbu.xlsx +0 -0
  116. data/test/files/bbu.xml +0 -152
  117. data/test/files/bode-v1.ods.zip +0 -0
  118. data/test/files/bode-v1.xls.zip +0 -0
  119. data/test/files/boolean.csv +0 -2
  120. data/test/files/boolean.ods +0 -0
  121. data/test/files/boolean.xls +0 -0
  122. data/test/files/boolean.xlsx +0 -0
  123. data/test/files/boolean.xml +0 -112
  124. data/test/files/borders.ods +0 -0
  125. data/test/files/borders.xls +0 -0
  126. data/test/files/borders.xlsx +0 -0
  127. data/test/files/borders.xml +0 -144
  128. data/test/files/bug-numbered-sheet-names.xlsx +0 -0
  129. data/test/files/bug-row-column-fixnum-float.xls +0 -0
  130. data/test/files/bug-row-column-fixnum-float.xml +0 -127
  131. data/test/files/comments.ods +0 -0
  132. data/test/files/comments.xls +0 -0
  133. data/test/files/comments.xlsx +0 -0
  134. data/test/files/csvtypes.csv +0 -1
  135. data/test/files/datetime.ods +0 -0
  136. data/test/files/datetime.xls +0 -0
  137. data/test/files/datetime.xlsx +0 -0
  138. data/test/files/datetime.xml +0 -142
  139. data/test/files/datetime_floatconv.xls +0 -0
  140. data/test/files/datetime_floatconv.xml +0 -148
  141. data/test/files/dreimalvier.ods +0 -0
  142. data/test/files/emptysheets.ods +0 -0
  143. data/test/files/emptysheets.xls +0 -0
  144. data/test/files/emptysheets.xlsx +0 -0
  145. data/test/files/emptysheets.xml +0 -105
  146. data/test/files/excel2003.xml +0 -21140
  147. data/test/files/false_encoding.xls +0 -0
  148. data/test/files/false_encoding.xml +0 -132
  149. data/test/files/file_item_error.xlsx +0 -0
  150. data/test/files/formula.ods +0 -0
  151. data/test/files/formula.xls +0 -0
  152. data/test/files/formula.xlsx +0 -0
  153. data/test/files/formula.xml +0 -134
  154. data/test/files/formula_parse_error.xls +0 -0
  155. data/test/files/formula_parse_error.xml +0 -1833
  156. data/test/files/formula_string_error.xlsx +0 -0
  157. data/test/files/html-escape.ods +0 -0
  158. data/test/files/link.xls +0 -0
  159. data/test/files/link.xlsx +0 -0
  160. data/test/files/matrix.ods +0 -0
  161. data/test/files/matrix.xls +0 -0
  162. data/test/files/named_cells.ods +0 -0
  163. data/test/files/named_cells.xls +0 -0
  164. data/test/files/named_cells.xlsx +0 -0
  165. data/test/files/no_spreadsheet_file.txt +0 -1
  166. data/test/files/numbers1.csv +0 -18
  167. data/test/files/numbers1.ods +0 -0
  168. data/test/files/numbers1.xls +0 -0
  169. data/test/files/numbers1.xlsx +0 -0
  170. data/test/files/numbers1.xml +0 -312
  171. data/test/files/numeric-link.xlsx +0 -0
  172. data/test/files/only_one_sheet.ods +0 -0
  173. data/test/files/only_one_sheet.xls +0 -0
  174. data/test/files/only_one_sheet.xlsx +0 -0
  175. data/test/files/only_one_sheet.xml +0 -67
  176. data/test/files/paragraph.ods +0 -0
  177. data/test/files/paragraph.xls +0 -0
  178. data/test/files/paragraph.xlsx +0 -0
  179. data/test/files/paragraph.xml +0 -127
  180. data/test/files/prova.xls +0 -0
  181. data/test/files/ric.ods +0 -0
  182. data/test/files/simple_spreadsheet.ods +0 -0
  183. data/test/files/simple_spreadsheet.xls +0 -0
  184. data/test/files/simple_spreadsheet.xlsx +0 -0
  185. data/test/files/simple_spreadsheet.xml +0 -225
  186. data/test/files/simple_spreadsheet_from_italo.ods +0 -0
  187. data/test/files/simple_spreadsheet_from_italo.xls +0 -0
  188. data/test/files/simple_spreadsheet_from_italo.xml +0 -242
  189. data/test/files/so_datetime.csv +0 -7
  190. data/test/files/style.ods +0 -0
  191. data/test/files/style.xls +0 -0
  192. data/test/files/style.xlsx +0 -0
  193. data/test/files/style.xml +0 -154
  194. data/test/files/time-test.csv +0 -2
  195. data/test/files/time-test.ods +0 -0
  196. data/test/files/time-test.xls +0 -0
  197. data/test/files/time-test.xlsx +0 -0
  198. data/test/files/time-test.xml +0 -131
  199. data/test/files/type_excel.ods +0 -0
  200. data/test/files/type_excel.xlsx +0 -0
  201. data/test/files/type_excelx.ods +0 -0
  202. data/test/files/type_excelx.xls +0 -0
  203. data/test/files/type_openoffice.xls +0 -0
  204. data/test/files/type_openoffice.xlsx +0 -0
  205. data/test/files/whitespace.ods +0 -0
  206. data/test/files/whitespace.xls +0 -0
  207. data/test/files/whitespace.xlsx +0 -0
  208. data/test/files/whitespace.xml +0 -184
  209. data/test/rm_sub_test.rb +0 -12
  210. data/test/rm_test.rb +0 -7
  211. data/test/test_generic_spreadsheet.rb +0 -259
  212. data/website/index.html +0 -385
  213. data/website/index.txt +0 -423
  214. data/website/javascripts/rounded_corners_lite.inc.js +0 -285
  215. data/website/stylesheets/screen.css +0 -130
  216. data/website/template.rhtml +0 -48
data/CHANGELOG DELETED
@@ -1,417 +0,0 @@
1
- == 1.13.2 2013-12-23
2
-
3
- * bugfixes
4
- * Fix that Excelx link-cells would blow up if the value wasn't a string. Due to the way Spreadsheet::Link is implemented the link text must be treated as a string. #92
5
-
6
- == 1.13.1 2013-12-23
7
-
8
- * bugfixes
9
- * Fix that Excelx creation could blow up due to nil rels files. #90
10
-
11
- == 1.13.0 2013-12-05
12
-
13
- * enhancements
14
- * Support extracting link data from Excel and Excelx spreadsheets,
15
- via Excel#read_cell(_content) and Excelx#hyperlink(?). #47
16
- * Support setting the Excel Spreadsheet mode via the :mode option. #88
17
- * Support Spreadsheet.open with a declared :extension that includes a leading '.'. #73
18
- * Enable file type detection for URI's with parameters / anchors. #51
19
-
20
- * bugfixes
21
- * Fix that CSV#each_row could overwrite the filename when run against a uri. #77
22
- * Fix that #to_matrix wasn't respecting the sheet argument. #87
23
-
24
- == 1.12.2 2013-09-11
25
-
26
- * 1 enhancement
27
- * Support rubyzip >= 1.0.0. #65
28
- * Fix typo in deprecation notices. #63
29
-
30
- == 1.12.1 2013-08-18
31
-
32
- * 1 enhancement
33
- * Support :boolean fields for CSV export via #cell_to_csv. #59
34
-
35
- * 2 bugfixes
36
- * Fix that Excelx would error on files with gaps in the numbering of their
37
- internal sheet#.xml files. #58
38
- * Fix that Base#info to preserve the original value of #default_sheet. #44
39
-
40
- == 1.12.0 2013-08-18
41
-
42
- * 3 deprecations
43
- * Rename Openoffice -> OpenOffice, Libreoffice -> LibreOffice, Csv -> CSV, and redirect the old names to the new constants
44
- * Enable Roo::Excel, Excel2003XML, Excelx, OpenOffice to accept an options hash, and deprecate the old method argument based approach to supplying them options
45
- * Roo's roo_rails_helper, aka the `spreadsheet` html-generating view method is currently deprecated with no replacement. If you find it helpful, tell http://github.com/Empact or extract it yourself.
46
-
47
- * 9 enhancements
48
- * Add Roo::Excelx#load_xml so that people can customize to their data, e.g. #23
49
- * Enable passing csv_options to Roo::CSV, which are passed through to the underlying CSV call.
50
- * Enable passing options through from Roo::Spreadsheet to any Roo type.
51
- * Enable passing an :extension option to Roo::Spreadsheet.new, which will override the extension detected on in the path #15
52
- * Switch from google-spreadsheet-ruby to google_drive for Roo::Google access #40
53
- * Make all the classes consistent in that #read_cells is only effective if the sheet has not been read.
54
- * Roo::Google supports login via oauth :access_token. #61
55
- * Roo::Excel now exposes its Spreadsheet workbook via #workbook
56
- * Pull #load_xml down into Roo::Base, and use it in Excel2003XML and OpenOffice.
57
-
58
- * 2 changes
59
- * #formula? now returns truthy or falsey, rather than true/false.
60
- * Base#longest_sheet was moved to Excel, as it only worked under Excel
61
-
62
- * 1 bugfix
63
- * Fix that Roo::CSV#parse(headers: true) would blow up. #37
64
-
65
- == 1.11.2 2013-04-10
66
-
67
- * 4 bugfixes
68
- * Fix that Roo::Spreadsheet.open wasn't tolerant to case differences.
69
- * Fix that Roo::Excel2003XML loading was broken #27
70
- * Enable loading Roo::Csv files from uris, just as other file types #31
71
- * Fix that Excelx "m/d/yy h:mm" was improperly being interpreted as date rather
72
- than datetime #29
73
-
74
- == 1.11.1 2013-03-18
75
-
76
- * 1 bugfix
77
- * Exclude test/log/roo.log test log file from the gemspec in order to avoid a
78
- rubygems warning: #26
79
-
80
- == 1.11.0 2013-03-14
81
-
82
- * 3 enhancements
83
- * Support ruby 2.0.0 by replacing Iconv with String#encode #19
84
- * Excelx: Loosen the format detection rules such that more are
85
- successfully detected #20
86
- * Delete the roo binary, which was useless and not declared in the gemspec
87
-
88
- * 1 change
89
- * Drop support for ruby 1.8.x or lower. Required in order to easily support 2.0.0.
90
-
91
- == 1.10.3 2013-03-03
92
-
93
- * 1 bugfix
94
- * Support both nokogiri 1.5.5 and 1.5.6 (Karsten Richter) #18
95
-
96
- * 1 enhancement
97
- * Relax our nokogiri dependency back to 1.4.0, as we have no particular reason
98
- to require a newer version.
99
-
100
- == 1.10.2 2013-02-03
101
-
102
- * 2 bugfixes
103
- * Support opening URIs with query strings https://github.com/Empact/roo/commit/abf94bdb59cabc16d4f7764025e88e3661983525
104
- * Support both http: & https: urls https://github.com/Empact/roo/commit/fc5c5899d96dd5f9fbb68125d0efc8ce9be2c7e1
105
-
106
- == 1.10.1 2011-11-14
107
-
108
- * 2 bugfixes
109
- * forgot dependency 'rubyzip'
110
- * at least one external application does create xlsx-files with different internal file names which differ from the original file names of Excel. Solution: ignore lower-/upper case in file names.
111
-
112
- == 1.10.0 2011-10-10
113
-
114
- * 4 enhancements
115
- * New class Csv.
116
- * Openoffice, Libreoffice: new method 'labels'
117
- * Excelx: implemented all methods concerning labels
118
- * Openoffice, Excelx: new methods concerning comments (comment, comment? and comments)
119
-
120
- * 2 bugfixes
121
- * XLSX: some cells were not recognized correctly from a spreadsheet file from a windows mobile phone.
122
- * labels: Moved to a separate methode. There were problems if there was an access to a label before read_cells were called.
123
-
124
- == 1.9.7 2011-08-27
125
-
126
- * 1 bugfix
127
- * Openoffice: Better way for extracting formula strings, some characters were deleted at the formula string.
128
-
129
- == 1.9.6 2011-08-03
130
-
131
- * 1 enhancement
132
- * new class Libreoffice (Libreoffice should do exactly the same as the Openoffice
133
- class. It's just another name. Technically, Libreoffice is inherited from
134
- the Openoffice class with no new methods.
135
- * 3 bugfixes
136
- * Openoffice: file type check, deletion of temporary files not in ensure clause
137
- * Cell type :datetime was not handled in the to_csv method
138
- * Better deletion of temporary directories if something went wrong
139
-
140
- == 1.9.5 2011-06-25
141
-
142
- * 1 enhancement
143
- * Method #formulas moved to generic-spreadsheet class (the Excel version is
144
- overwritten because the spreadsheet gem currently does not support
145
- formulas.
146
- * 3 bugfixes
147
- * Openoffice/Excelx/Google: #formulas of an empty sheet should not result
148
- in an error message. Instead it should return an empty array.
149
- * Openoffice/Excelx/Google: #to_yaml of an empty sheet should not result
150
- in an error message. Instead it should return an empty string.
151
- * Openoffice/Excelx/Google: #to_matrix of an empty sheet should not result
152
- in an error message. Instead it should return an empty matrix.
153
-
154
- == 1.9.4 2011-06-23
155
-
156
- * 1 enhancement
157
- * removed gem 'builder'. Functionality goes to gem 'nokogiri'.
158
- * 3 bugfixes
159
- * Excel: remove temporary files if spreadsheed-file is not an excel file
160
- and an exception was raised
161
- * Excelx: a referenced cell with a string had the content 0.0 not the
162
- correct string
163
- * Fixed a problem with a date cell which was not recognized as a Date
164
- object (see 2011-05-21 in excelx.rb)
165
-
166
- == 1.9.3 2010-02-12
167
-
168
- * 1 enhancements
169
- * new method 'to_matrix'
170
- * 1 bugfix
171
- * missing dependencies defined
172
-
173
- == 1.9.2 2009-12-08
174
-
175
- * 1 bugfix
176
- * double quoting of '"' fixed
177
-
178
- == 1.9.1 2009-11-10
179
-
180
- * 2 bugfixes
181
- * syntax in nokogiri methods
182
- * missing dependency ...rubyzip
183
-
184
- == 1.9.0 2009-10-29
185
-
186
- * 4 enhancements
187
- * Ruby 1.9 compatible
188
- * oo.aa42 as a shortcut of oo.cell('aa',42)
189
- * oo.aa42('sheet1') as a shortcut of oo.cell('aa',42,'sheet1')
190
- * oo.anton as a reference to a cell labelled 'anton' (or any other label name)
191
- (currently only for Openoffice spreadsheets)
192
-
193
- == 1.2.3 2009-01-04
194
-
195
- * bugfix
196
- * fixed encoding in #cell at exported Google-spreadsheets (.xls)
197
-
198
- == 1.2.2 2008-12-14
199
-
200
- * 2 enhancements
201
- * added celltype :datetime in Excelx
202
- * added celltype :datetime in Google
203
-
204
- == 1.2.1 2008-11-13
205
-
206
- * 1 enhancement
207
- * added celltype :datetime in Openoffice and Excel
208
-
209
- == 1.2.0 2008-08-24
210
- * 3 major enhancements
211
- * Excelx: improved the detection of cell type and conversion into roo types
212
- * All: to_csv: changed boundaries from first_row,1..last_row,last_column to 1,1..last_row,last_column
213
- * All: Environment variable "ROO_TMP" indicate where temporary directories will be created (if not set the default is the current working directory)
214
- * 2 bugfixes
215
- * Excel: improved the detection of last_row/last_column (parseexcel-gem bug?)
216
- * Excel/Excelx/Openoffice: temporary directories were not removed at opening a file of the wrong type
217
- == 1.1.0 2008-07-26
218
- * 2 major enhancements
219
- * Excel: speed improvements
220
- * Changed the behavior of reading files with the wrong type
221
- * 3 bugfixes
222
- * Google: added normalize in set_value method
223
- * Excel: last_row in Excel class did not work properly under some circumstances
224
- * all: fixed a bug in #to_xml if there is an empty sheet
225
- == 1.0.2 2008-07-04
226
- * 2 bugfixes
227
- * Excelx: fixed a bug when there are .xml.rels files in the XLSX archive
228
- * Excelx: fixed a bug with celltype recognition (see comment with "2008-07-03")
229
- == 1.0.1 2008-06-30
230
- * 1 bugfix
231
- * Excel: row/column method Fixnum/Float confusion
232
- == 1.0.0 2008-05-28
233
- * 2 major enhancements
234
- * support of Excel's new .xlsx file format
235
- * method #to_xml for exporting a spreadsheet to an xml representation
236
- * 1 bugfix
237
- * fixed a bug with excel-spreadsheet character conversion under Macintosh Darwin
238
- == 0.9.4 2008-04-22
239
- * 1 bugfix
240
- * fixed a bug with excel-spreadsheet character conversion under Solaris
241
- == 0.9.3 2008-03-25
242
- * 1 bugfix
243
- * no more tmp directories if an invalid spreadsheet file was openend
244
- == 0.9.2 2008-03-24
245
- * 1 enhancement
246
- * new celltype :time
247
- * 1 bugfix
248
- * time values like '23:15' are handled as seconds from midnight
249
- == 0.9.1 2008-03-23
250
- * 1 enhancement
251
- * additional 'sheet' parameter in Google#set_value
252
- * 1 bugfix
253
- * fixed a bug within Google#set_value. thanks to davecahill <dpcahill@gmail.com> for the patch.
254
- == 0.9.0 2008-01-24
255
- * 1 enhancement:
256
- * better support of roo spreadsheets in rails views
257
- == 0.8.5 2008-01-16
258
- * 1 bugfix
259
- * fixed a bug within #to_cvs and explicit call of a sheet
260
- == 0.8.4 2008-01-01
261
- * 1 bugfix
262
- * fixed 'find_by_condition' for excel sheets (header_line= --> GenericSpredsheet)
263
- == 0.8.3 2007-12-31
264
- * 2 bugfixes
265
- * another fix for the encoding issue in excel sheet-names
266
- * reactived the Excel#find method which has been disappeared in the last restructoring, moved to GenericSpreadsheet
267
- == 0.8.2 2007-12-28
268
- * 1 enhancement:
269
- * basename() only in method #info
270
- * 2 bugfixes
271
- * changed logging-method to mysql-database in test code with AR, table column 'class' => 'class_name'
272
- * reactived the Excel#to_csv method which has been disappeared in the last restructoring
273
- == 0.8.1 2007-12-22
274
- * 3 bugfixes
275
- * fixed a bug with first/last-row/column in empty sheet
276
- * #info prints now '- empty -' if a sheet within a document is empty
277
- * tried to fix the iconv conversion problem
278
- == 0.8.0 2007-12-15
279
- * 2 enhancements:
280
- * Google online spreadsheets were implemented
281
- * some methods common to more than one class were factored out to the GenericSpreadsheet (virtual) class
282
- == 0.7.0 2007-11-23
283
- * 6 enhancements:
284
- * Openoffice/Excel: the most methods can be called with an option 'sheet'
285
- parameter which will be used instead of the default sheet
286
- * Excel: improved the speed of CVS output
287
- * Openoffice/Excel: new method #column
288
- * Openoffice/Excel: new method #find
289
- * Openoffice/Excel: new method #info
290
- * better exception if a spreadsheet file does not exist
291
- == 0.6.1 2007-10-06
292
- * 2 enhancements:
293
- * Openoffice: percentage-values are now treated as numbers (not strings)
294
- * Openoffice: refactoring
295
- * 1 bugfix
296
- * Openoffice: repeating date-values in a line are now handled correctly
297
- == 0.6.0 2007-10-06
298
- * 1 enhancement:
299
- * csv-output to stdout or file
300
- == 0.5.4 2007-08-27
301
- * 1 bugfix
302
- * Openoffice: fixed a bug with internal representation of a spreadsheet (thanks to Ric Kamicar for the patch)
303
- == 0.5.3 2007-08-26
304
- * 2 enhancements:
305
- * Openoffice: can now read zip-ed files
306
- * Openoffice: can now read files from http://-URL over the net
307
- == 0.5.2 2007-08-26
308
- * 1 bugfix
309
- * excel: removed debugging output
310
- == 0.5.1 2007-08-26
311
- * 4 enhancements:
312
- * Openoffice: Exception if an illegal sheet-name is selected
313
- * Openoffice/Excel: no need to set a default_sheet if there is only one in
314
- the document
315
- * Excel: can now read zip-ed files
316
- * Excel: can now read files from http://-URL over the net
317
-
318
- == 0.5.0 2007-07-20
319
- * 3 enhancements:
320
- * Excel-objects: the methods default_sheet= and sheets can now handle names instead of numbers
321
- * changed the celltype methods to return symbols, not strings anymore (possible values are :formula, :float, :string, :date, :percentage (if you need strings you can convert it with .to_s)
322
- * tests can now run on the client machine (not only my machine), if there are not public released files involved these tests are skipped
323
-
324
- == 0.4.1 2007-06-27
325
- * 1 bugfix
326
- * there was ONE false require-statement which led to misleading error messageswhen this gem was used
327
-
328
- == 0.4.0 2007-06-27
329
- * 7 enhancements:
330
- * robustness: Exception if no default_sheet was set
331
- * new method reload() implemented
332
- * about 15 % more method documentation
333
- * optimization: huge increase of speed (no need to use fixed borders anymore)
334
- * added the method 'formulas' which gives you all formulas in a spreadsheet
335
- * added the method 'set' which can set cells to a certain value
336
- * added the method 'to_yaml' which can produce output for importing in a (rails) database
337
- * 4 bugfixes
338
- * ..row_as_letter methods were nonsense - removed
339
- * @cells_read should be reset if the default_sheet is changed
340
- * error in excel-part: strings are now converted to utf-8 (the parsexcel-gem gave me an error with my test data, which could not converted to .to_s using latin1 encoding)
341
- * fixed bug when default_sheet is changed
342
-
343
- == 0.3.0 2007-06-20
344
- * 1 enhancement:
345
- * Openoffice: formula support
346
-
347
- == 0.2.7 2007-06-20
348
- * 1 bugfix:
349
- * Excel: float-numbers were truncated to integer
350
-
351
- == 0.2.6 2007-06-19
352
- * 1 bugfix:
353
- * Openoffice: two or more consecutive cells with string content failed
354
-
355
- == 0.2.5 2007-06-17
356
-
357
- * 2 enhancements:
358
- * Excel: row method implemented
359
- * more tests
360
- * 1 bugfix:
361
- * Openoffice: row method fixed
362
-
363
- == 0.2.4 2007-06-16
364
- * 1 bugfix:
365
- * ID 11605 Two cols with same value: crash roo (openoffice version only)
366
-
367
- == 0.2.3 2007-06-02
368
- * 3 enhancements:
369
- * more robust call att Excel#default_sheet= when called with a name
370
- * new method empty?
371
- * refactoring
372
- * 1 bugfix:
373
- * bugfix in Excel#celltype
374
- * bugfix (running under windows only) in closing the temp file before removing it
375
-
376
- == 0.2.2 2007-06-01
377
- * 1 bugfix:
378
- * correct pathname for running with windows
379
-
380
-
381
- == 0.2.2 2007-06-01
382
- * 1 bugfix:
383
- * incorrect dependencies fixed
384
-
385
- == 0.2.0 2007-06-01
386
- * 1 major enhancement:
387
- * support for MS-Excel Spreadsheets
388
-
389
- == 0.1.2 2007-05-31
390
- * 1 major enhancement:
391
- * cells with more than one character, like 'AA' can now be handled
392
-
393
- == 0.1.1 2007-05-31
394
- * 1 Bugfix
395
- * Bugfix in first/last methods
396
-
397
- == 0.1.0 2007-05-31
398
-
399
- * 1 major enhancement:
400
- * new methods first/last row/column
401
- * new method officeversion
402
-
403
- == 0.0.3 2007-05-30
404
-
405
- * 1 minor enhancement:
406
- * new method row()
407
-
408
- == 0.0.2 2007-05-30
409
-
410
- * 2 major enhancement:
411
- * fixed some bugs
412
- * more ways to access a cell
413
-
414
- == 0.0.1 2007-05-25
415
-
416
- * 1 major enhancement:
417
- * Initial release
data/Gemfile.lock DELETED
@@ -1,78 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- addressable (2.3.5)
5
- crack (0.4.1)
6
- safe_yaml (~> 0.9.0)
7
- diff-lcs (1.2.1)
8
- faraday (0.8.7)
9
- multipart-post (~> 1.1)
10
- git (1.2.5)
11
- google_drive (0.3.6)
12
- nokogiri (>= 1.4.4, != 1.5.2, != 1.5.1)
13
- oauth (>= 0.3.6)
14
- oauth2 (>= 0.5.0)
15
- httpauth (0.2.0)
16
- jeweler (1.8.3)
17
- bundler (~> 1.0)
18
- git (>= 1.2.5)
19
- rake
20
- rdoc
21
- json (1.7.7)
22
- json (1.7.7-java)
23
- jwt (0.1.8)
24
- multi_json (>= 1.5)
25
- multi_json (1.7.3)
26
- multi_xml (0.5.3)
27
- multipart-post (1.2.0)
28
- nokogiri (1.5.6)
29
- nokogiri (1.5.6-java)
30
- oauth (0.4.7)
31
- oauth2 (0.9.1)
32
- faraday (~> 0.8)
33
- httpauth (~> 0.1)
34
- jwt (~> 0.1.4)
35
- multi_json (~> 1.0)
36
- multi_xml (~> 0.5)
37
- rack (~> 1.2)
38
- rack (1.5.2)
39
- rake (0.9.2.2)
40
- rdoc (3.12.2)
41
- json (~> 1.4)
42
- rspec (2.13.0)
43
- rspec-core (~> 2.13.0)
44
- rspec-expectations (~> 2.13.0)
45
- rspec-mocks (~> 2.13.0)
46
- rspec-core (2.13.1)
47
- rspec-expectations (2.13.0)
48
- diff-lcs (>= 1.1.3, < 2.0)
49
- rspec-mocks (2.13.0)
50
- ruby-ole (1.2.11.6)
51
- rubyzip (1.0.0)
52
- safe_yaml (0.9.4)
53
- shoulda (3.0.1)
54
- shoulda-context (~> 1.0.0)
55
- shoulda-matchers (~> 1.0.0)
56
- shoulda-context (1.0.0)
57
- shoulda-matchers (1.0.0)
58
- spreadsheet (0.8.2)
59
- ruby-ole (>= 1.0)
60
- vcr (2.5.0)
61
- webmock (1.13.0)
62
- addressable (>= 2.2.7)
63
- crack (>= 0.3.2)
64
-
65
- PLATFORMS
66
- java
67
- ruby
68
-
69
- DEPENDENCIES
70
- google_drive
71
- jeweler
72
- nokogiri
73
- rspec
74
- rubyzip
75
- shoulda
76
- spreadsheet (> 0.6.4)
77
- vcr
78
- webmock
data/README.markdown DELETED
@@ -1,126 +0,0 @@
1
- # README for Roo
2
-
3
- Roo implements read access for all spreadsheet types and read/write access for
4
- Google spreadsheets. It can handle
5
- * OpenOffice
6
- * Excel
7
- * Google spreadsheets
8
- * Excelx
9
- * LibreOffice
10
- * CSV
11
-
12
- ## Notes
13
-
14
- ### XLS
15
-
16
- There is no support for formulas in Roo for .xls files - you can get the result
17
- of a formula but not the formula itself.
18
-
19
- ### Google Spreadsheet
20
-
21
- Using Roo to access Google spreadsheets requires you install the 'google-spreadsheet-ruby' gem separately.
22
-
23
- ## License
24
-
25
- While Roo is licensed under the MIT / Expat license, please note that the 'spreadsheet' gem [is released under](https://github.com/zdavatz/spreadsheet/blob/master/LICENSE.txt) the GPLv3 license.
26
-
27
- ## Usage:
28
-
29
- ```ruby
30
- require 'roo'
31
-
32
- s = Roo::OpenOffice.new("myspreadsheet.ods") # loads an OpenOffice Spreadsheet
33
- s = Roo::Excel.new("myspreadsheet.xls") # loads an Excel Spreadsheet
34
- s = Roo::Google.new("myspreadsheetkey_at_google") # loads a Google Spreadsheet
35
- s = Roo::Excelx.new("myspreadsheet.xlsx") # loads an Excel Spreadsheet for Excel .xlsx files
36
- s = Roo::CSV.new("mycsv.csv") # loads a CSV file
37
-
38
- # You can use CSV to load TSV files, or files of a certain encoding by passing
39
- # in options under the :csv_options key
40
- s = Roo::CSV.new("mytsv.tsv", csv_options: {col_sep: "\t"}) # TSV
41
- s = Roo::CSV.new("mycsv.csv", csv_options: {encoding: Encoding::ISO_8859_1}) # csv with explicit encoding
42
-
43
- s.default_sheet = s.sheets.first # first sheet in the spreadsheet file will be used
44
-
45
- # s.sheets is an array which holds the names of the sheets within
46
- # a spreadsheet.
47
- # you can also write
48
- # s.default_sheet = s.sheets[3] or
49
- # s.default_sheet = 'Sheet 3'
50
-
51
- s.cell(1,1) # returns the content of the first row/first cell in the sheet
52
- s.cell('A',1) # same cell
53
- s.cell(1,'A') # same cell
54
- s.cell(1,'A',s.sheets[0]) # same cell
55
-
56
- # almost all methods have an optional argument 'sheet'.
57
- # If this parameter is omitted, the default_sheet will be used.
58
-
59
- s.info # prints infos about the spreadsheet file
60
-
61
- s.first_row # the number of the first row
62
- s.last_row # the number of the last row
63
- s.first_column # the number of the first column
64
- s.last_column # the number of the last column
65
-
66
- # limited font information is available
67
-
68
- s.font(1,1).bold?
69
- s.font(1,1).italic?
70
- s.font(1,1).underline?
71
-
72
-
73
- # Spreadsheet.open can accept both files and paths
74
-
75
- xls = Roo::Spreadsheet.open('./new_prices.xls')
76
-
77
- # If the File.path or provided path string does not have an extension, you can optionally
78
- # provide one as a string or symbol
79
-
80
- xls = Roo::Spreadsheet.open('./rails_temp_upload', extension: :xls)
81
-
82
- # no more setting xls.default_sheet, just use this
83
-
84
- xls.sheet('Info').row(1)
85
- xls.sheet(0).row(1)
86
-
87
- # excel likes to create random "Data01" sheets for macros
88
- # use this to find the sheet with the most data to parse
89
-
90
- xls.longest_sheet
91
-
92
- # this excel file has multiple worksheets, let's iterate through each of them and process
93
-
94
- xls.each_with_pagename do |name, sheet|
95
- p sheet.row(1)
96
- end
97
-
98
- # pull out a hash of exclusive column data (get rid of useless columns and save memory)
99
-
100
- xls.each(:id => 'UPC',:qty => 'ATS') {|hash| arr << hash}
101
- #=> hash will appear like {:upc=>727880013358, :qty => 12}
102
-
103
- # NOTE: .parse does the same as .each, except it returns an array (similar to each vs. map)
104
-
105
- # not sure exactly what a column will be named? try a wildcard search with the character *
106
- # regex characters are allowed ('^price\s')
107
- # case insensitive
108
-
109
- xls.parse(:id => 'UPC*SKU',:qty => 'ATS*\sATP\s*QTY$')
110
-
111
- # if you need to locate the header row and assign the header names themselves,
112
- # use the :header_search option
113
-
114
- xls.parse(:header_search => ['UPC*SKU','ATS*\sATP\s*QTY$'])
115
- #=> each element will appear in this fashion:
116
- #=> {"UPC" => 123456789012, "STYLE" => "987B0", "COLOR" => "blue", "QTY" => 78}
117
-
118
- # want to strip out annoying unicode characters and surrounding white space?
119
-
120
- xls.parse(:clean => true)
121
-
122
- # another bonus feature is a patch to prevent the Spreadsheet gem from parsing
123
- # thousands and thousands of blank lines. i got fed up after watching my computer
124
- # nearly catch fire for 4 hours for a spreadsheet with only 200 ACTUAL lines
125
- # - located in lib/roo/worksheet.rb
126
- ```
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.13.2