-
Notifications
You must be signed in to change notification settings - Fork 7
Tables
southcitygene edited this page Jan 3, 2013
·
2 revisions
Tables are formed as a list of lists like so:
table [
["R1C1", "R1C2", "R1C3"],
["R2C1", "R2C2", "R2C3"],
["R3C1", "R3C2", "R3C3"],
]
(Default:
false
)
Borders are off by default to turn them on pass "borders: true
" after the table content
(Default:
none
)
Border type can include several different options. Single, thick, double, dash, wave, etc.
More options can be found here: OOXML
(Default:
auto
)
Border color can be adjusted by handing it a hex color. e.g. "#909090"
(Default:
true
)
To disable use "headings: false
"
document = Rocx::Document.new do
body do
heading "Let's create a table"
table [
["A", "B", "C"],
[1, 2, 3]
]
end
end
document = Rocx::Document.new do
body do
heading "Let's create a table with dashed grey borders"
table [
["I", "Have"],
["Dashed", "Borders"]
], borders: true, border_type: 'dash', border_color: "#C0C0C0"
end
end