extract-from-docx

1.0.4 • Public • Published

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);
    });

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.4
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.4
    1
  • 1.0.3
    0
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i extract-from-docx

Weekly Downloads

0

Version

1.0.4

License

ISC

Unpacked Size

4.18 kB

Total Files

3

Last publish

Collaborators

  • arnavgaur