exportExcel

About This Task

Exports Excel spreadsheets (.xlsx) to CSV and AsciiDoc tables using Apache POI. Each worksheet is exported as both .csv and .adoc. Formulas are evaluated and exported statically.

./dtcw4 local exportExcel

Output is written to <inputPath>/excel/[filename]/[worksheet].(adoc|csv) (by default src/docs/excel/…​). The src folder is used (not build) to preserve change history in version control.

Including Exported Data

As AsciiDoc table (preserves alignment, col-span, row-span, colors):

include::excel/Sample.xlsx/Numerical.adoc[]

As CSV:

[options="header",format="csv"]
|===
include::excel/Sample.xlsx/Numerical.csv[]
|===

Further Reading

Source

View the source of this task: scripts/exportExcel.groovy on GitHub