Skip to content

Commit

Permalink
Merge tag 'v1.0.2' into develop
Browse files Browse the repository at this point in the history
Tagging version v1.0.2 v1.0.2
  • Loading branch information
plandem committed Jul 18, 2019
2 parents 39362ed + 3b3252d commit c412649
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/src/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func main() {
```

### Open the existing file
To open XLSX file using filename or file handler
To open XLSX file using filename or io.Reader
```go
xl, err := xlsx.Open("./foo.xlsx")
if err != nil {
Expand All @@ -54,7 +54,7 @@ To update the existing XLSX file
}
```

To save a new XLSX file or under different name
To save XLSX file under different name or to io.Writer
```go
if err := xl.SaveAs("./foo.xlsx"); err != nil {
fmt.Println(err)
Expand Down
15 changes: 14 additions & 1 deletion docs/src/guide/styles-formatting.md
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
# Styles Formatting
# Styles Formatting
[[toc]]

### Font

### Fill

### Border

### Alignment

### Numbers

### Protection
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module github.com/plandem/xlsx
go 1.12

require (
github.com/plandem/ooxml v1.1.1
github.com/plandem/ooxml v1.1.2
github.com/stretchr/testify v1.3.0
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ github.com/plandem/ooxml v1.1.0 h1:A5wWAcTleoqSF8W5qGL6TJf5oa7TXm5S+0+HtHKEMZo=
github.com/plandem/ooxml v1.1.0/go.mod h1:6ZGylBk9B60EDlMS2DjcXt5laACXuY2huRgQME1KX2A=
github.com/plandem/ooxml v1.1.1 h1:YfCx3WOfyrIJBajs9V3PU4DVpgLvZDrQsH6Q0v0bwIs=
github.com/plandem/ooxml v1.1.1/go.mod h1:6ZGylBk9B60EDlMS2DjcXt5laACXuY2huRgQME1KX2A=
github.com/plandem/ooxml v1.1.2 h1:f/ML/k501oeQiODK5O7YRheFWLvdgP3X5hzyaKakcnE=
github.com/plandem/ooxml v1.1.2/go.mod h1:6ZGylBk9B60EDlMS2DjcXt5laACXuY2huRgQME1KX2A=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
9 changes: 9 additions & 0 deletions xlsx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package xlsx_test

import (
"bytes"
"github.com/plandem/xlsx"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -72,6 +73,14 @@ func TestSaving(t *testing.T) {
err = xl.SaveAs("./test_files/tmp.xlsx")
assert.Nil(t, err)

//save to io.Writer
xl, err = xlsx.Open("./test_files/example_simple.xlsx")
require.NotNil(t, xl)
require.Nil(t, err)
require.IsType(t, &xlsx.Spreadsheet{}, xl)
err = xl.SaveAs(bytes.NewBuffer(nil))
require.Nil(t, err)

//save under differ name
xl, err = xlsx.Open("./test_files/example_simple.xlsx")
require.NotNil(t, xl)
Expand Down

0 comments on commit c412649

Please sign in to comment.