We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package main
import ( "fmt"
"github.com/nguyenthenguyen/docx"
)
func main() {
// Read from docx file r, err := docx.ReadDocxFile("./a.docx") // Or read from memory // r, err := docx.ReadDocxFromMemory(data io.ReaderAt, size int64) // Or read from a filesystem object: // r, err := docx.ReadDocxFromFS(file string, fs fs.FS) if err != nil { fmt.Println("----") panic(err) fmt.Println("====") } docx1 := r.Editable() // Replace like https://golang.org/pkg/strings/#Replace docx1.Replace("OS_CPU", "OK", -1) docx1.WriteToFile("./a.docx") r.Close()
}
panic: zip: not a valid zip file
goroutine 1 [running]: main.main() D:/Go/src/testdoc/testdoc.go:21 +0x1a5 exit status 2
The text was updated successfully, but these errors were encountered:
No branches or pull requests
package main
import (
"fmt"
)
func main() {
}
PS D:\Go\src\testdoc> go run .\testdoc.go
panic: zip: not a valid zip file
goroutine 1 [running]:
main.main()
D:/Go/src/testdoc/testdoc.go:21 +0x1a5
exit status 2
The text was updated successfully, but these errors were encountered: