如何在 rails 上的 ruby 中使用 rtf 文件中的 table 格式?
How to format the table in rtf file while using it at ruby on rails?
table = document.table(5, 4) 做 |t|
t.border_width = 20
t[0][0] << "Patient:"
t[0][1] << "#{@patient.given_names} #{@patient.surname}"
t[0][2] << "Date of Test:"
t[0][3] << "#{@activity.seen_at.try(:strftime, "%d/%m/%Y")}"
这是在 .rtf 文件中生成 table 的代码块,但单元格的格式不正确。我需要有关 .rtf 文件格式的帮助
table 的正确格式可以使用以下命令
table = document.table(5, 4)
table.border_width = 20
table.each do |row|
row.each{ |cell| cell.width = 2000 }
end
table = document.table(5, 4) 做 |t|
t.border_width = 20
t[0][0] << "Patient:"
t[0][1] << "#{@patient.given_names} #{@patient.surname}"
t[0][2] << "Date of Test:"
t[0][3] << "#{@activity.seen_at.try(:strftime, "%d/%m/%Y")}"
这是在 .rtf 文件中生成 table 的代码块,但单元格的格式不正确。我需要有关 .rtf 文件格式的帮助
table 的正确格式可以使用以下命令
table = document.table(5, 4)
table.border_width = 20
table.each do |row|
row.each{ |cell| cell.width = 2000 }
end