diff options
| author | Stefan Daschek <[email protected]> | 2022-09-23 10:44:41 +0200 |
|---|---|---|
| committer | Stefan Daschek <[email protected]> | 2022-09-23 10:44:41 +0200 |
| commit | 2ed0f25b31aa7ced3ff4e1f8307424be7624c667 (patch) | |
| tree | cf3c0063c5f0dcab985f494c01b867d17bcf524b | |
| parent | 9b6a78f43b9415bd155bddf6a6d872f5d5555595 (diff) | |
| download | caxlsx-2ed0f25b31aa7ced3ff4e1f8307424be7624c667.tar.gz caxlsx-2ed0f25b31aa7ced3ff4e1f8307424be7624c667.zip | |
Improve documentation for `Worksheet#styles`
Closes #166
| -rw-r--r-- | lib/axlsx/workbook/worksheet/worksheet.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb index f8882559..921687c8 100644 --- a/lib/axlsx/workbook/worksheet/worksheet.rb +++ b/lib/axlsx/workbook/worksheet/worksheet.rb @@ -627,11 +627,12 @@ module Axlsx r = rows[row_index] if r - return r[col_index] + return r[col_index] end end - # shortcut method to access styles direclty from the worksheet + # Shortcut method to access workbook styles + # # This lets us do stuff like: # @example # p = Axlsx::Package.new @@ -640,6 +641,9 @@ module Axlsx # sheet.add_row ['Oh No!'], :styles => my_style # end # p.serialize 'foo.xlsx' + # + # @note The XLSX format does not support worksheet-specific styles. Even when using this method + # you're still working with the single global {Axlsx::Styles} object in the workbook. def styles @styles ||= self.workbook.styles end |
