Skip to content

Commit

Permalink
Fix wrong array syntax in README
Browse files Browse the repository at this point in the history
%[] without w or W prefix is simply a string…
  • Loading branch information
felixbuenemann authored Jul 28, 2016
1 parent fda44f3 commit ace4071
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ io = StringIO.new('')
xlsx = Xlsxtream::Workbook.new(io)
xlsx.write_worksheet "Sheet1" do |sheet|
# Number of columns doesn't have to match
sheet << %[first row]
sheet << %[second row with more colums]
sheet << %w[first row]
sheet << %w[second row with more colums]
end
# Write multiple worksheets with custom names:
xlsx.write_worksheet "Foo & Bar" do |sheet|
Expand All @@ -52,9 +52,9 @@ end
# have a huge amount of rows or a little duplication of content
# accros cells. A single SST is used across the whole workbook.
xlsx.write_worksheet("SST", use_shared_strings: true) do |sheet|
sheet << %(the same old story)
sheet << %(the old same story)
sheet << %(old, the same story)
sheet << %w[the same old story]
sheet << %w[the old same story]
sheet << %w[old, the same story]
end
# Writes metadata and ZIP archive central directory.
xlsx.close
Expand Down

0 comments on commit ace4071

Please sign in to comment.