README ¶ goword Go Package to extract text from word docx files usage import ( "fmt" "github.com/frederikhs/goword" "log" ) func main() { text, err := goword.ParseText("1.docx") if err != nil { log.Panic(err) } fmt.Println(text) } Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func ParseText(filename string) (string, error) type Paragraph type Row type Style type WordDocument func Parse(doc string) (WordDocument, error) func (w WordDocument) AsText() string Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func ParseText ¶ func ParseText(filename string) (string, error) Types ¶ type Paragraph ¶ type Paragraph struct { Style Style `xml:"pPr>pStyle"` Rows []Row `xml:"r"` } type Row ¶ type Row struct { Text string `xml:"t"` } type Style ¶ type Style struct { Val string `xml:"val,attr"` } type WordDocument ¶ type WordDocument struct { Paragraphs []Paragraph } func Parse ¶ func Parse(doc string) (WordDocument, error) func (WordDocument) AsText ¶ func (w WordDocument) AsText() string Source Files ¶ View all Source files goword.go models.go Click to show internal directories. Click to hide internal directories.