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)
| 69 | // will be returned, otherwise the original value will be returned. All cells' |
| 70 | // values will be the same in a merged range. |
| 71 | func (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. |