Skip to content

Commit

Permalink
Merge pull request randym#282 from zyphlar/master
Browse files Browse the repository at this point in the history
Column_widths must be set after add_row is called
  • Loading branch information
randym committed Feb 4, 2014
2 parents 0f18d74 + fe8c85e commit 525eb7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/axlsx/workbook/worksheet/worksheet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ def add_page_break(cell)
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
Expand Down

0 comments on commit 525eb7b

Please sign in to comment.