我将 Axlsx gem 用于某些数据导出。一些单元格需要一个边框来环绕它们。虽然我能够在单元格的顶部、边框和左侧获得边框,但无法显示右侧边框。 (见下图)
我使用了两种不同的方法。
明确:
@box_title = worksheet.styles.add_style border: { style: :thin, color: "000000", edges: [:top, :bottom, :right, :left] }, alignment: {horizontal: :center}, b: true
不那么明确:
@box_title = worksheet.styles.add_style border: { style: :thin, color: "000000" }, alignment: {horizontal: :center}, b: true
两者都产生与上述相同的结果。
我怎样才能让合适的寄宿生出现?