summaryrefslogtreecommitdiff
path: root/cell.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-01-05 00:13:29 +0800
committerxuri <xuri.me@gmail.com>2022-01-05 00:13:29 +0800
commit9e64df6a96685afcfbc7295beda38739868a6871 (patch)
tree091e643fe90da2e6bf5eb5a198ca8a8ca59c2ce2 /cell.go
parente37e060d6f97274c1e967cea40609623493bce25 (diff)
Update create style example, using a pointer of the structure instead of JSON
Diffstat (limited to 'cell.go')
-rw-r--r--cell.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/cell.go b/cell.go
index 146d0a2..dec743b 100644
--- a/cell.go
+++ b/cell.go
@@ -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":