You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Borders are off by default to turn them on pass "borders: true" after the table content
Border Type
(Default: none)
Border type can include several different options. Single, thick, double, dash, wave, etc.
More options can be found here: OOXML
Border Color
(Default: auto)
Border color can be adjusted by handing it a hex color. e.g. "#909090"
Table Heading
(Default: true)
To disable use "headings: false"
Examples
Creating a simple table
document = Rocx::Document.new do
body do
heading "Let's create a table"
table [
["A", "B", "C"],
[1, 2, 3]
]
end
end
Creating a table with borders
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