| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- 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
- }
- // AddStreamCell takes as input a StreamCell, creates a new Cell from it,
- // and appends the new cell to the row.
- func (r *Row) AddStreamCell(streamCell StreamCell) {
- cell := NewCell(r)
- cell.Value = streamCell.cellData
- cell.style = streamCell.cellStyle.style
- cell.NumFmt = builtInNumFmt[streamCell.cellStyle.xNumFmtId]
- cell.cellType = streamCell.cellType
- r.Cells = append(r.Cells, cell)
- // TODO
- r.Sheet.maybeAddCol(len(r.Cells))
- }
|