diff options
author | Ri Xu <xuri.me@gmail.com> | 2017-01-17 19:06:42 +0800 |
---|---|---|
committer | Ri Xu <xuri.me@gmail.com> | 2017-01-17 19:06:42 +0800 |
commit | a99f0227b085d8f417f77864941650ef0e6273e4 (patch) | |
tree | d1b8fd8c323614c9defeaa6c9d10f6f432019e50 /README.md | |
parent | 53d8c4bb3aca921d7dd0a4ac3233887208513bfb (diff) |
- New function `AddPicture()` added, support to add picture into excel cell;
- go test updated;
- fix typo and `gofmt -s` formatted
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -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. |