read_docx: Read data from a Modern Word File

Description Usage Arguments Details Value Examples

Description

Read data from a Modern Word File

Usage

1
read_docx(docx, tables = T, drawings = T, diagrams = T)

Arguments

docx

The .docx file to read

tables

Should tables be processed from the document?

drawings

Should drawings be processed from the document?

diagrams

Should diagrams be processed from the document?

Details

Only accepts one file at a time and only .docx files. Modifying file extensions will not work.

List is comprised of named elements, one per 'section' (sections are recognized after a page break). If tables exist in the document and are processed, then the named list elements will be lists containing the text of paragraphs, drawings (if present and processed) and matrices holding the table structure. Otherwise, the list elements will contain vectors of the text processed.

Diagrams are typically what Microsoft calls 'SmartArt'

Value

Named list with document contents

Examples

1
2
read_docx(docx = system.file('extdata','example.docx',package='readOffice'))
read_docx(docx = system.file('extdata','example.docx',package='readOffice'),diagrams=FALSE)

bmewing/readOffice documentation built on May 12, 2019, 10:27 p.m.