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

Method GetCellValue

cell.go:71–80  ·  view source on GitHub ↗

GetCellValue provides a function to get formatted value from cell by given worksheet name and cell reference in spreadsheet. The return value is converted to the 'string' data type. This function is concurrency safe. If the cell format can be applied to the value of a cell, the applied value will be

(sheet, cell string, opts ...Options)

Source from the content-addressed store, hash-verified

69// will be returned, otherwise the original value will be returned. All cells'
70// values will be the same in a merged range.
71func (f *File) GetCellValue(sheet, cell string, opts ...Options) (string, error) {
72 return f.getCellStringFunc(sheet, cell, func(x *xlsxWorksheet, c *xlsxC) (string, bool, error) {
73 sst, err := f.sharedStringsReader()
74 if err != nil {
75 return "", true, err
76 }
77 val, err := c.getValueFrom(f, sst, f.getOptions(opts...).RawCellValue)
78 return val, true, err
79 })
80}
81
82// GetCellType provides a function to get the cell's data type by given
83// worksheet name and cell reference in spreadsheet file.

Callers 15

TestDeleteTableFunction · 0.95
cellResolverMethod · 0.95
TestDuplicateRowFunction · 0.95
setTableColumnsMethod · 0.95
GetMergeCellsMethod · 0.95
TestStreamWriterFunction · 0.95
getTableFieldsOrderMethod · 0.95

Calls 4

getCellStringFuncMethod · 0.95
sharedStringsReaderMethod · 0.95
getOptionsMethod · 0.95
getValueFromMethod · 0.80

Tested by 15

TestDeleteTableFunction · 0.76
TestDuplicateRowFunction · 0.76
TestStreamWriterFunction · 0.76
TestSetCellFloatFunction · 0.76
TestSetCellUintFunction · 0.76
TestSetCellValueFunction · 0.76