diff options
author | xuri <xuri.me@gmail.com> | 2021-11-17 00:25:36 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-11-17 00:25:36 +0800 |
commit | bc3c7d51a2efe5f0ad85667a8f9636f13941d577 (patch) | |
tree | d8df81412ae201e427c3e43c6aa8638f8e3c247b /picture.go | |
parent | bda8e7f8129dae0064c47f8e051f76492e1128f5 (diff) |
ref #65: new formula function PRICE
- fix COUPPCD result accuracy issue
- update close spreadsheet example in documentation and README
Diffstat (limited to 'picture.go')
-rw-r--r-- | picture.go | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -481,14 +481,20 @@ func (f *File) getSheetRelationshipsTargetByID(sheet, rID string) string { } // GetPicture provides a function to get picture base name and raw content -// embed in XLSX by given worksheet and cell name. This function returns the -// file name in XLSX and file contents as []byte data types. For example: +// embed in spreadsheet by given worksheet and cell name. This function +// returns the file name in spreadsheet and file contents as []byte data +// types. For example: // // f, err := excelize.OpenFile("Book1.xlsx") // if err != nil { // fmt.Println(err) // return // } +// defer func() { +// if err := f.Close(); err != nil { +// fmt.Println(err) +// } +// }() // file, raw, err := f.GetPicture("Sheet1", "A2") // if err != nil { // fmt.Println(err) @@ -497,9 +503,6 @@ func (f *File) getSheetRelationshipsTargetByID(sheet, rID string) string { // if err := ioutil.WriteFile(file, raw, 0644); err != nil { // fmt.Println(err) // } -// if err = f.Close(); err != nil { -// fmt.Println(err) -// } // func (f *File) GetPicture(sheet, cell string) (string, []byte, error) { col, row, err := CellNameToCoordinates(cell) |