From a99f0227b085d8f417f77864941650ef0e6273e4 Mon Sep 17 00:00:00 2001 From: Ri Xu Date: Tue, 17 Jan 2017 19:06:42 +0800 Subject: - New function `AddPicture()` added, support to add picture into excel cell; - go test updated; - fix typo and `gofmt -s` formatted --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 3d0d24c..1c77058 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,28 @@ func main() { } ``` +### Add pictures to XLSX files + +```go +package main + +import ( + "fmt" + "os" + + "github.com/Luxurioust/excelize" +) + +func main() { + xlsx := excelize.CreateFile() + err := xlsx.AddPicture("Sheet1", "A2", "H9", "/tmp/image.jpg") + if err != nil { + fmt.Println(err) + os.Exit(1) + } +} +``` + ## Contributing Contributions are welcome! Open a pull request to fix a bug, or open an issue to discuss a new feature or change. -- cgit v1.2.1