diff options
author | Ri Xu <xuri.me@gmail.com> | 2017-04-30 20:03:43 +0800 |
---|---|---|
committer | Ri Xu <xuri.me@gmail.com> | 2017-04-30 20:03:43 +0800 |
commit | 7f30a6c9430476bcd5fc1662523ada0e95f60947 (patch) | |
tree | 80d4341e95a80aedae3076c87b90447a881b32c8 /README.md | |
parent | 46b8c46d91be522c3dff1044a23810ecb1a81c96 (diff) |
- Initialize shape support: new function `AddShape()` added. Relate issue #38;
- Drawing `nvPicPr` element ID property calculation changed;
- go test updated
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -45,7 +45,7 @@ func main() { // Set active sheet of the workbook. xlsx.SetActiveSheet(2) // Save xlsx file by the given path. - err := xlsx.WriteTo("/tmp/Workbook.xlsx") + err := xlsx.WriteTo("./Workbook.xlsx") if err != nil { fmt.Println(err) os.Exit(1) @@ -69,7 +69,7 @@ import ( ) func main() { - xlsx, err := excelize.OpenFile("/tmp/Workbook.xlsx") + xlsx, err := excelize.OpenFile("./Workbook.xlsx") if err != nil { fmt.Println(err) os.Exit(1) @@ -142,23 +142,23 @@ import ( ) func main() { - xlsx, err := excelize.OpenFile("/tmp/Workbook.xlsx") + xlsx, err := excelize.OpenFile("./Workbook.xlsx") if err != nil { fmt.Println(err) os.Exit(1) } // Insert a picture. - err = xlsx.AddPicture("Sheet1", "A2", "/tmp/image1.gif", "") + err = xlsx.AddPicture("Sheet1", "A2", "./image1.gif", "") if err != nil { fmt.Println(err) } // Insert a picture to sheet with scaling. - err = xlsx.AddPicture("Sheet1", "D2", "/tmp/image2.jpg", `{"x_scale": 0.5, "y_scale": 0.5}`) + err = xlsx.AddPicture("Sheet1", "D2", "./image2.jpg", `{"x_scale": 0.5, "y_scale": 0.5}`) if err != nil { fmt.Println(err) } // Insert a picture offset in the cell with printing support. - err = xlsx.AddPicture("Sheet1", "H2", "/tmp/image3.gif", `{"x_offset": 15, "y_offset": 10, "print_obj": true, "lock_aspect_ratio": false, "locked": false}`) + err = xlsx.AddPicture("Sheet1", "H2", "./image3.gif", `{"x_offset": 15, "y_offset": 10, "print_obj": true, "lock_aspect_ratio": false, "locked": false}`) if err != nil { fmt.Println(err) } |