diff options
| author | Will Bradley <[email protected]> | 2014-02-04 03:20:01 -0700 |
|---|---|---|
| committer | Will Bradley <[email protected]> | 2014-02-04 03:20:01 -0700 |
| commit | fe8c85e331e903e84603ba979bb5a39f683c57b9 (patch) | |
| tree | 2fd675bf2d867b4de35d12586d63060650aed70c /lib | |
| parent | 0f18d74d4a478ee6f61fe7f1326f47a9ecf12c1d (diff) | |
| download | caxlsx-fe8c85e331e903e84603ba979bb5a39f683c57b9.tar.gz caxlsx-fe8c85e331e903e84603ba979bb5a39f683c57b9.zip | |
Column_widths must be set after add_row is called
Fixes https://github.com/randym/axlsx/issues/165
Diffstat (limited to 'lib')
| -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 |
