0.7.1 • Published 14 days ago

xlsx2md v0.7.1

Weekly downloads
-
License
MIT
Repository
-
Last release
14 days ago

xlsx2md

Library to support conversion from OpenXML spreadsheet documents to Pandoc's markdown grid tables.

Usage

const xlsx2md = require('xlsx2md');
const fs = require('fs');

const archive = fs.readFileSync('./tests/sample.xlsx');

const configString = `<?xml version="1.0" encoding="utf-8" ?>
<xlsx2md>
    <SheetLoader>
        <Sheet name="">
            <Title><![CDATA[Table 1. A sample table name]]></Title>
        </Sheet>
    </SheetLoader>
</xlsx2md>`;

const result = xlsx2md.convert(archive, 80, configString);

fs.writeFileSync('./tests/output.md', result, {
    encoding: 'utf-8'
});

Result

Table: Table 1. A sample table name

+:--------:+:-------------:+:--------------:+:--------------------------------:+
|**№**     |{{B1}}         |**Amount**      |**Unit&nbsp;Price**               |
+----------+---------------+----------------+----------------------------------+
|1         |Unit&nbsp;A    |1               |$100\.00                          |
+----------+---------------+----------------+----------------------------------+
|2         |Unit&nbsp;B    |2               |$2\,000\,000\.00                  |
+----------+---------------+----------------+----------------------------------+
|3         |Unit&nbsp;C    |3               |$300\.58                          |
+----------+---------------+----------------+----------------------------------+
|**Original&nbsp;Price**                    |**$2\,000\,400\.58**              |
+----------+---------------+----------------+----------------------------------+
|**Discount**                               |**30\.3%**                        |
+                                           +----------------------------------+
|                                           |**\-$606\,782**                   |
+----------+---------------+----------------+----------------------------------+
|**Current&nbsp;Price**                     |**$1\,393\,619\.07**              |
+----------+---------------+----------------+----------------------------------+
|**Expiration&nbsp;Date**                   |2023/10/1&nbsp;09\:10\:01\.234    |
+----------+---------------+----------------+----------------------------------+

---
'meta-Table 1. A sample table name':
  '@align-r2c2': 'AlignLeft'
  '@align-r2c4': 'AlignRight'
  '@align-r3c2': 'AlignLeft'
  '@align-r3c4': 'AlignRight'
  '@align-r4c2': 'AlignLeft'
  '@align-r4c4': 'AlignRight'
  '@align-r5c2': 'AlignRight'
  '@align-r6c2': 'AlignRight'
  '@align-r7c1': 'AlignRight'
  '@align-r8c2': 'AlignRight'
  '@align-r9c2': 'AlignRight'
  'B1': |
    **Unit&nbsp;Name**
---
0.7.1

14 days ago

0.7.0

20 days ago

0.6.5

21 days ago

0.6.4

2 months ago

0.6.3

2 months ago

0.6.2

2 months ago

0.6.1

4 months ago

0.6.0

4 months ago

0.5.18

5 months ago

0.5.19

5 months ago

0.5.17

5 months ago

0.5.16

5 months ago

0.5.15

5 months ago

0.5.12

5 months ago

0.5.10

5 months ago

0.5.11

5 months ago

0.5.8

6 months ago

0.5.7

6 months ago

0.5.9

5 months ago

0.5.4

6 months ago

0.4.5

7 months ago

0.5.3

6 months ago

0.4.4

7 months ago

0.5.6

6 months ago

0.5.0

6 months ago

0.4.1

7 months ago

0.5.2

6 months ago

0.4.3

7 months ago

0.5.1

6 months ago

0.4.2

7 months ago

0.4.0

7 months ago

0.3.1

7 months ago

0.3.0

7 months ago

0.2.2

7 months ago

0.2.1

7 months ago

0.2.0

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago