forked from p30928647/excelize
This closes #986, fix set data validation drop list failed in some cases
Update documentation for `GetCellValue` and simplify code
This commit is contained in:
parent
c49e7aab30
commit
43a057b1ea
4
cell.go
4
cell.go
|
@ -34,8 +34,8 @@ const (
|
|||
// GetCellValue provides a function to get formatted value from cell by given
|
||||
// worksheet name and axis in spreadsheet file. If it is possible to apply a
|
||||
// format to the cell value, it will do so, if not then an error will be
|
||||
// returned, along with the raw value of the cell. All cells value will be
|
||||
// same in a merged range.
|
||||
// returned, along with the raw value of the cell. All cells' values will be
|
||||
// the same in a merged range.
|
||||
func (f *File) GetCellValue(sheet, axis string) (string, error) {
|
||||
return f.getCellStringFunc(sheet, axis, func(x *xlsxWorksheet, c *xlsxC) (string, bool, error) {
|
||||
val, err := c.getValueFrom(f, f.sharedStringsReader())
|
||||
|
|
|
@ -154,7 +154,7 @@ func (dd *DataValidation) SetRange(f1, f2 float64, t DataValidationType, o DataV
|
|||
//
|
||||
func (dd *DataValidation) SetSqrefDropList(sqref string, isCurrentSheet bool) error {
|
||||
if isCurrentSheet {
|
||||
dd.Formula1 = sqref
|
||||
dd.Formula1 = fmt.Sprintf("<formula1>%s</formula1>", sqref)
|
||||
dd.Type = convDataValidationType(typeList)
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -622,7 +622,7 @@ func (f *File) drawingsWriter() {
|
|||
}
|
||||
|
||||
// drawingResize calculate the height and width after resizing.
|
||||
func (f *File) drawingResize(sheet string, cell string, width, height float64, formatSet *formatPicture) (w, h, c, r int, err error) {
|
||||
func (f *File) drawingResize(sheet, cell string, width, height float64, formatSet *formatPicture) (w, h, c, r int, err error) {
|
||||
var mergeCells []MergeCell
|
||||
mergeCells, err = f.GetMergeCells(sheet)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue