1.0.4 • Published 1 year ago

extract-from-docx v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

extract-from-docx

Extracts text and table data from .docx files and returns a Promise in the form of an object.

Installation

You can install extract-from-docx via npm or yarn:

  • Node

    npm install extract-from-docx
  • Yarn

    yarn add extract-from-docx

Usage

  • Below is an example of usage of package.

    const { extractText, extractTables } = require('extract-from-docx');
    
    # Specify the path to the .docx file
    const docxFilePath = 'path/to/your/document.docx';
    
    # Extract text from the document
    extractText(docxFilePath)
    .then(text => {
        console.log('Extracted Text:', text);
    })
    .catch(error => {
        console.error('Error extracting text:', error);
    });
    
    # Extract tables from the document
    extractTables(docxFilePath)
    .then(tables => {
        console.log('Extracted Tables:', tables);
    })
    .catch(error => {
        console.error('Error extracting tables:', error);
    });
1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago