diff options
author | xuri <xuri.me@gmail.com> | 2022-01-05 00:13:29 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2022-01-05 00:13:29 +0800 |
commit | 9e64df6a96685afcfbc7295beda38739868a6871 (patch) | |
tree | 091e643fe90da2e6bf5eb5a198ca8a8ca59c2ce2 /cell.go | |
parent | e37e060d6f97274c1e967cea40609623493bce25 (diff) |
Update create style example, using a pointer of the structure instead of JSON
Diffstat (limited to 'cell.go')
-rw-r--r-- | cell.go | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -666,9 +666,17 @@ type HyperlinkOpts struct { // in this workbook. Maximum limit hyperlinks in a worksheet is 65530. The // below is example for external link. // -// err := f.SetCellHyperLink("Sheet1", "A3", "https://github.com/xuri/excelize", "External") +// if err := f.SetCellHyperLink("Sheet1", "A3", +// "https://github.com/xuri/excelize", "External"); err != nil { +// fmt.Println(err) +// } // // Set underline and font color style for the cell. -// style, err := f.NewStyle(`{"font":{"color":"#1265BE","underline":"single"}}`) +// style, err := f.NewStyle(&excelize.Style{ +// Font: &excelize.Font{Color: "#1265BE", Underline: "single"}, +// }) +// if err != nil { +// fmt.Println(err) +// } // err = f.SetCellStyle("Sheet1", "A3", "A3", style) // // A this is another example for "Location": |