diff options
| author | Weston Ganger <[email protected]> | 2022-10-12 23:23:31 -0700 |
|---|---|---|
| committer | Weston Ganger <[email protected]> | 2022-10-12 23:26:55 -0700 |
| commit | d5db40a886e6675214b247b8eb8c649f30a84f18 (patch) | |
| tree | 407703060450fa81aea3ff7c1008f7844396838c | |
| parent | 28d59a1dba55a9d98ceed26ac3bed6267cf18481 (diff) | |
| download | caxlsx-d5db40a886e6675214b247b8eb8c649f30a84f18.tar.gz caxlsx-d5db40a886e6675214b247b8eb8c649f30a84f18.zip | |
Add example images, Fix axlsx_styler check
| -rw-r--r-- | examples/add_border_example.md | 2 | ||||
| -rw-r--r-- | examples/append_styles_example.md | 4 | ||||
| -rw-r--r-- | examples/images/add_border_example.png | bin | 0 -> 7026 bytes | |||
| -rw-r--r-- | examples/images/append_styles_example.png | bin | 0 -> 8034 bytes | |||
| -rw-r--r-- | lib/axlsx.rb | 8 |
5 files changed, 6 insertions, 8 deletions
diff --git a/examples/add_border_example.md b/examples/add_border_example.md index 934cf183..d64b940d 100644 --- a/examples/add_border_example.md +++ b/examples/add_border_example.md @@ -25,4 +25,4 @@ p.serialize "add_border.xlsx" ## Output - + diff --git a/examples/append_styles_example.md b/examples/append_styles_example.md index 0dc7792c..d8cb4696 100644 --- a/examples/append_styles_example.md +++ b/examples/append_styles_example.md @@ -21,11 +21,11 @@ wb.add_worksheet do |sheet| sheet.add_style "B3:D5", bg_color: "E2F89C" sheet.add_style "D3:D5", alignment: { horizontal: :left } sheet.add_style ["C3:C4", "D3:D4"], fg_color: "00FF00" -nd +end p.serialize "append_styles.xlsx" ``` ## Output - + diff --git a/examples/images/add_border_example.png b/examples/images/add_border_example.png Binary files differnew file mode 100644 index 00000000..f18ac144 --- /dev/null +++ b/examples/images/add_border_example.png diff --git a/examples/images/append_styles_example.png b/examples/images/append_styles_example.png Binary files differnew file mode 100644 index 00000000..5b8b2d55 --- /dev/null +++ b/examples/images/append_styles_example.png diff --git a/lib/axlsx.rb b/lib/axlsx.rb index e02256e6..23082b71 100644 --- a/lib/axlsx.rb +++ b/lib/axlsx.rb @@ -32,13 +32,11 @@ require 'set' require 'time' begin - require "axlsx_styler" - - if defined?(AxlsxStyler) + if Gem.loaded_specs.has_key?("axlsx_styler") raise StandardError.new("Please remove `axlsx_styler` from your Gemfile, the associated functionality is now built-in to `caxlsx` directly.") end -rescue LoadError - # Do nothing, all good +rescue + # Do nothing end # xlsx generation with charts, images, automated column width, customizable styles |
