README.md in spreadsheet_architect-2.0.1 vs README.md in spreadsheet_architect-2.0.2
- old
+ new
@@ -1,7 +1,6 @@
# Spreadsheet Architect
-<a href='https://www.patreon.com/bePatron?u=4956947' target='_blank'><img height='32' style='border:0px;height:32px;' src='https://miraclesfor.me/wp-content/plugins/patron-button-and-widgets-by-codebard/images/patreon-medium-button.png' border='0' alt='Become a Patron' /></a>
<a href='https://ko-fi.com/A5071NK' target='_blank'><img height='32' style='border:0px;height:32px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=a' border='0' alt='Buy Me a Coffee' /></a>
Spreadsheet Architect is a library that allows you to create XLSX, ODS, or CSV spreadsheets easily from ActiveRecord relations, Plain Ruby classes, or predefined data.
Key Features:
@@ -175,30 +174,36 @@
|**merges**<br>*Array*||Merge cells. [See this example for usage](https://github.com/westonganger/spreadsheet_architect/blob/master/examples/complex_xlsx_styling.rb)|
|**borders**<br>*Array*||[See this example for usage](https://github.com/westonganger/spreadsheet_architect/blob/master/examples/complex_xlsx_styling.rb)|
|**column_widths**<br>*Array*||Sometimes you may want explicit column widths. Use nil if you want a column to autofit again.|
<br>
+
## SomeClass.to_ods
+
|Option|Default|Notes|
|---|---|---|
|**spreadsheet_columns**<br>*Array*| This defaults to your models custom `spreadsheet_columns` method or any custom defaults defined.<br>If none of those then falls back to `self.column_names` for ActiveRecord models. | Use this option to override the model instances `spreadsheet_columns` method|
|**instances**<br>*Array*| |**Required only for Non-ActiveRecord models** Array of class/model instances.|
|**headers**<br>*2D Array*|`self.column_names.collect(&:titleize)`|Pass `false` to skip the header row.|
|**sheet_name**<br>*String*|The class name||
|**header_style**<br>*Hash*|`{background_color: "AAAAAA", color: "FFFFFF", align: :center, font_size: 10, bold: true}`|Note: Currently ODS only supports these options (values can be changed though)|
|**row_style**<br>*Hash*|`{background_color: nil, color: "000000", align: :left, font_size: 10, bold: false}`|Styles for non-header rows. Currently ODS only supports these options|
<br>
+
## SomeClass.to_csv
+
|Option|Default|Notes|
|---|---|---|
|**spreadsheet_columns**<br>*Array*| This defaults to your models custom `spreadsheet_columns` method or any custom defaults defined.<br>If none of those then falls back to `self.column_names` for ActiveRecord models. | Use this to option override the model instances `spreadsheet_columns` method|
|**instances**<br>*Array*| |**Required only for Non-ActiveRecord classes** Array of class/model instances.|
|**headers**<br>*2D Array*|`self.column_names.collect(&:titleize)`| Data for the header rows cells. Pass `false` to skip the header row.|
<br>
+
## SpreadsheetArchitect.to_xlsx
+
|Option|Default|Notes|
|---|---|---|
|**data**<br>*Array*| |Data for the non-header row cells. |
|**headers**<br>*2D Array*|`false`|Data for the header row cells. Pass `false` to skip the header row.|
|**sheet_name**<br>*String*|`Sheet1`||
@@ -210,22 +215,26 @@
|**borders**<br>*Array*||[See this example for usage](https://github.com/westonganger/spreadsheet_architect/blob/master/examples/complex_xlsx_styling.rb)|
|**column_types**<br>*Array*||Valid types for XLSX are :string, :integer, :float, :date, :time, :boolean, nil = auto determine|
|**column_widths**<br>*Array*||Sometimes you may want explicit column widths. Use nil if you want a column to autofit again.|
<br>
+
## SpreadsheetArchitect.to_ods
+
|Option|Default|Notes|
|---|---|---|
|**data**<br>*2D Array*| |Data for the non-header row cells.|
|**headers**<br>*2D Array*|`false`|Data for the header rows cells. Pass `false` to skip the header row.|
|**sheet_name**<br>*String*|`Sheet1`||
|**header_style**<br>*Hash*|`{background_color: "AAAAAA", color: "FFFFFF", align: :center, font_size: 10, bold: true}`|Note: Currently ODS only supports these options|
|**row_style**<br>*Hash*|`{background_color: nil, color: "000000", align: :left, font_size: 10, bold: false}`|Styles for non-header rows. Currently ODS only supports these options|
|**column_types**<br>*Array*||Valid types for ODS are :string, :float, :date, :percent, :currency, nil = auto determine|
<br>
+
## SpreadsheetArchitect.to_csv
+
|Option|Default|Notes|
|---|---|---|
|**data**<br>*2D Array*| |Data for the non-header row cells.|
|**headers**<br>*2D Array*|`false`|Data for the header rows cells. Pass `false` to skip the header row.|
@@ -289,15 +298,14 @@
See this example: (https://github.com/westonganger/spreadsheet_architect/blob/master/examples/multi_sheet_spreadsheets.rb)
# Axlsx Style Reference
-I have compiled a list of all available style options for `axlsx` here: (https://github.com/westonganger/spreadsheet_architect/blob/master/docs/axlsx_styles_reference.md)
+I have compiled a list of all available style options for `axlsx` here: (https://github.com/westonganger/spreadsheet_architect/blob/master/docs/axlsx_style_reference.md)
# Credits
-Created by Weston Ganger - @westonganger
+Created by [@westonganger](https://github.com/westonganger)
-Heavily influenced by the dead gem `acts_as_xlsx` by @randym but adapted to work for more spreadsheet types and plain ruby models.
+For any consulting or contract work please contact me via my company website: [Solid Foundation Web Development](https://solidfoundationwebdev.com)
-<a href='https://www.patreon.com/bePatron?u=4956947' target='_blank'><img height='32' style='border:0px;height:32px;' src='https://miraclesfor.me/wp-content/plugins/patron-button-and-widgets-by-codebard/images/patreon-medium-button.png' border='0' alt='Become a Patron' /></a>
-<a href='https://ko-fi.com/A5071NK' target='_blank'><img height='32' style='border:0px;height:32px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=a' border='0' alt='Buy Me a Coffee' /></a>
+[![Solid Foundation Web Development Logo](https://solidfoundationwebdev.com/logo.png)](https://solidfoundationwebdev.com)