diff options
| author | Randy Morgan (@morgan_randy) <[email protected]> | 2014-02-04 02:32:59 -0800 |
|---|---|---|
| committer | Randy Morgan (@morgan_randy) <[email protected]> | 2014-02-04 02:32:59 -0800 |
| commit | 525eb7b2328a5233cd77240715c16d47b5169dca (patch) | |
| tree | 2fd675bf2d867b4de35d12586d63060650aed70c | |
| parent | 0f18d74d4a478ee6f61fe7f1326f47a9ecf12c1d (diff) | |
| parent | fe8c85e331e903e84603ba979bb5a39f683c57b9 (diff) | |
| download | caxlsx-525eb7b2328a5233cd77240715c16d47b5169dca.tar.gz caxlsx-525eb7b2328a5233cd77240715c16d47b5169dca.zip | |
Merge pull request #282 from zyphlar/master
Column_widths must be set after add_row is called
| -rw-r--r-- | lib/axlsx/workbook/worksheet/worksheet.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb index 2dd5e3af..a2d92f3a 100644 --- a/lib/axlsx/workbook/worksheet/worksheet.rb +++ b/lib/axlsx/workbook/worksheet/worksheet.rb @@ -555,7 +555,7 @@ module Axlsx end # This is a helper method that Lets you specify a fixed width for multiple columns in a worksheet in one go. - # Axlsx is sparse, so if you have not set data for a column, you cannot set the width. + # Note that you must call column_widths AFTER adding data, otherwise the width will not be set successfully. # Setting a fixed column width to nil will revert the behaviour back to calculating the width for you on the next call to add_row. # @example This would set the first and third column widhts but leave the second column in autofit state. # ws.column_widths 7.2, nil, 3 |
