MCPcopy
hub / github.com/qax-os/excelize / prepareCellStyle

Method prepareCellStyle

cell.go:1605–1622  ·  view source on GitHub ↗

prepareCellStyle provides a function to prepare style index of cell in worksheet by given column index and style index.

(col, row, style int)

Source from the content-addressed store, hash-verified

1603// prepareCellStyle provides a function to prepare style index of cell in
1604// worksheet by given column index and style index.
1605func (ws *xlsxWorksheet) prepareCellStyle(col, row, style int) int {
1606 if style != 0 {
1607 return style
1608 }
1609 if row <= len(ws.SheetData.Row) {
1610 if styleID := ws.SheetData.Row[row-1].S; styleID != 0 {
1611 return styleID
1612 }
1613 }
1614 if ws.Cols != nil {
1615 for _, c := range ws.Cols.Col {
1616 if c.Min <= col && col <= c.Max && c.Style != 0 {
1617 return c.Style
1618 }
1619 }
1620 }
1621 return style
1622}
1623
1624// mergeCellsParser provides a function to check merged cells in worksheet by
1625// given cell reference.

Callers 10

setCellTimeFuncMethod · 0.80
SetCellIntMethod · 0.80
SetCellUintMethod · 0.80
SetCellBoolMethod · 0.80
SetCellFloatMethod · 0.80
SetCellStrMethod · 0.80
SetCellDefaultMethod · 0.80
SetCellRichTextMethod · 0.80
SetRowMethod · 0.80
GetCellStyleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected