GetCellType provides a function to get the cell's data type by given worksheet name and cell reference in spreadsheet file.
(sheet, cell string)
| 82 | // GetCellType provides a function to get the cell's data type by given |
| 83 | // worksheet name and cell reference in spreadsheet file. |
| 84 | func (f *File) GetCellType(sheet, cell string) (CellType, error) { |
| 85 | var ( |
| 86 | err error |
| 87 | cellTypeStr string |
| 88 | cellType CellType |
| 89 | ) |
| 90 | if cellTypeStr, err = f.getCellStringFunc(sheet, cell, func(x *xlsxWorksheet, c *xlsxC) (string, bool, error) { |
| 91 | return c.T, true, nil |
| 92 | }); err != nil { |
| 93 | return CellTypeUnset, err |
| 94 | } |
| 95 | cellType = cellTypes[cellTypeStr] |
| 96 | return cellType, err |
| 97 | } |
| 98 | |
| 99 | // SetCellValue provides a function to set the value of a cell. This function |
| 100 | // is concurrency safe. The specified coordinates should not be in the first |