File: row.go

package info (click to toggle)
golang-github-tealeg-xlsx 1.0.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 19,104 kB
  • sloc: makefile: 3
file content (27 lines) | stat: -rw-r--r-- 492 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package xlsx

type Row struct {
	Cells        []*Cell
	Hidden       bool
	Sheet        *Sheet
	Height       float64
	OutlineLevel uint8
	isCustom     bool
}

func (r *Row) SetHeight(ht float64) {
	r.Height = ht
	r.isCustom = true
}

func (r *Row) SetHeightCM(ht float64) {
	r.Height = ht * 28.3464567 // Convert CM to postscript points
	r.isCustom = true
}

func (r *Row) AddCell() *Cell {
	cell := NewCell(r)
	r.Cells = append(r.Cells, cell)
	r.Sheet.maybeAddCol(len(r.Cells))
	return cell
}