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

Function parseTableOptions

table.go:33–45  ·  view source on GitHub ↗

parseTableOptions provides a function to parse the format settings of the table with default value.

(opts *Table)

Source from the content-addressed store, hash-verified

31// parseTableOptions provides a function to parse the format settings of the
32// table with default value.
33func parseTableOptions(opts *Table) (*Table, error) {
34 var err error
35 if opts == nil {
36 return &Table{ShowRowStripes: boolPtr(true)}, err
37 }
38 if opts.ShowRowStripes == nil {
39 opts.ShowRowStripes = boolPtr(true)
40 }
41 if err = checkDefinedName(opts.Name); err != nil {
42 return opts, err
43 }
44 return opts, err
45}
46
47// AddTable provides the method to add table in a worksheet by given worksheet
48// name, range reference and format set. For example, create a table of A1:D5

Callers 2

AddTableMethod · 0.85
AddTableMethod · 0.85

Calls 2

boolPtrFunction · 0.85
checkDefinedNameFunction · 0.85

Tested by

no test coverage detected