row.go 493 B

123456789101112131415161718192021222324252627
  1. package xlsx
  2. type Row struct {
  3. Cells []*Cell
  4. Hidden bool
  5. Sheet *Sheet
  6. Height float64
  7. OutlineLevel uint8
  8. isCustom bool
  9. }
  10. func (r *Row) SetHeight(ht float64) {
  11. r.Height = ht
  12. r.isCustom = true
  13. }
  14. func (r *Row) SetHeightCM(ht float64) {
  15. r.Height = ht * 28.3464567 // Convert CM to postscript points
  16. r.isCustom = true
  17. }
  18. func (r *Row) AddCell() *Cell {
  19. cell := NewCell(r)
  20. r.Cells = append(r.Cells, cell)
  21. r.Sheet.maybeAddCol(len(r.Cells))
  22. return cell
  23. }