Skip to content
This repository has been archived by the owner on Apr 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request tealeg#477 from tealeg/fix-worksheet-cols
Browse files Browse the repository at this point in the history
Fix worksheet cols
  • Loading branch information
tealeg authored Oct 10, 2019
2 parents b632938 + d9a28ac commit 1eff72e
Show file tree
Hide file tree
Showing 25 changed files with 1,877 additions and 847 deletions.
24 changes: 12 additions & 12 deletions cell.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ type Cell struct {
HMerge int
VMerge int
cellType CellType
DataValidation *xlsxCellDataValidation
DataValidation *xlsxDataValidation
}

// CellInterface defines the public API of the Cell.
Expand Down Expand Up @@ -388,31 +388,31 @@ func (c *Cell) FormattedValue() (string, error) {
}

// SetDataValidation set data validation
func (c *Cell) SetDataValidation(dd *xlsxCellDataValidation) {
func (c *Cell) SetDataValidation(dd *xlsxDataValidation) {
c.DataValidation = dd
}

// CellMetadata represents anything attributable to a cell
// StreamingCellMetadata represents anything attributable to a cell
// except for the cell data itself. For example, it is used
// in StreamFileBuilder.AddSheetWithDefaultColumnMetadata to
// associate default attributes for cells in a particular column
type CellMetadata struct {
type StreamingCellMetadata struct {
cellType CellType
streamStyle StreamStyle
}

var (
DefaultStringCellMetadata CellMetadata
DefaultNumericCellMetadata CellMetadata
DefaultDecimalCellMetadata CellMetadata
DefaultIntegerCellMetadata CellMetadata
DefaultDateCellMetadata CellMetadata
DefaultStringStreamingCellMetadata StreamingCellMetadata
DefaultNumericStreamingCellMetadata StreamingCellMetadata
DefaultDecimalStreamingCellMetadata StreamingCellMetadata
DefaultIntegerStreamingCellMetadata StreamingCellMetadata
DefaultDateStreamingCellMetadata StreamingCellMetadata
)

func MakeCellMetadata(cellType CellType, streamStyle StreamStyle) CellMetadata {
return CellMetadata{cellType, streamStyle}
func MakeStreamingCellMetadata(cellType CellType, streamStyle StreamStyle) StreamingCellMetadata {
return StreamingCellMetadata{cellType, streamStyle}
}

func (cm CellMetadata) Ptr() *CellMetadata {
func (cm StreamingCellMetadata) Ptr() *StreamingCellMetadata {
return &cm
}
Loading

0 comments on commit 1eff72e

Please sign in to comment.