forked from p30928647/excelize
- Fix `checkCellInArea()` index out of range when merged cell ref is single coordinate, relate issue #206;
- go test updated; - Repository icon for SourceTree has been added
This commit is contained in:
parent
a6fc5a721d
commit
564ebe48dd
4
cell.go
4
cell.go
|
@ -532,6 +532,10 @@ func checkCellInArea(cell, area string) bool {
|
|||
area = strings.ToUpper(area)
|
||||
|
||||
ref := strings.Split(area, ":")
|
||||
if len(ref) < 2 {
|
||||
return false
|
||||
}
|
||||
|
||||
from := ref[0]
|
||||
to := ref[1]
|
||||
|
||||
|
|
|
@ -332,6 +332,7 @@ func TestMergeCell(t *testing.T) {
|
|||
xlsx.SetCellHyperLink("Sheet1", "J11", "https://github.com/360EntSecGroup-Skylar/excelize", "External")
|
||||
xlsx.SetCellFormula("Sheet1", "G12", "SUM(Sheet1!B19,Sheet1!C19)")
|
||||
xlsx.GetCellValue("Sheet1", "H11")
|
||||
xlsx.GetCellValue("Sheet2", "A6") // Merged cell ref is single coordinate.
|
||||
xlsx.GetCellFormula("Sheet1", "G12")
|
||||
err = xlsx.Save()
|
||||
if err != nil {
|
||||
|
|
BIN
test/Book1.xlsx
BIN
test/Book1.xlsx
Binary file not shown.
Loading…
Reference in New Issue