eplisp

Text Table to CSV

eplisp, the free multilingual LISP library

Text Table to CSV
Openly licensed; the original file is hosted here together with its license.
…
Rate this tool:
CommandsTEXTTOCSVNUMCOPYBLKNUMINSERTINDEX
CategoryData Export (Excel, CSV)
Authorddddo
Sourceddddo86/AutoLSP
LicenseMIT
RequirementsAutoCAD (versions that read UTF-8 LISP files), BricsCAD; TEXTTOCSV and NUMCOPY do not use ActiveX.
Prompt languagezh-TW
Filesnumber.lsp (18 KB)
Added2026-10-26
Download the original fileSource repository

TEXTTOCSV turns a table drawn with loose TEXT and MTEXT objects into a CSV file, grouping rows by Y and columns by X; the file also has numbering commands.

This file by ddddo contains four commands; the main one is TEXTTOCSV. It helps when a schedule (material list, sheet list and so on) was drawn with lines and individual texts rather than a real table object and needs to go into Excel. Prompts are in Traditional Chinese.

Overview

In TEXTTOCSV you select TEXT and MTEXT objects and enter a row tolerance (default 5.0). Texts are sorted top to bottom by Y; those within the tolerance of a row's first text are put in the same row. Each row is ordered left to right by X, and all values are written in double quotes, separated by commas, to the CSV file you choose.

The other commands in the file: NUMCOPY copies a text such as F001 and increases its number at each paste point (skipping numbers ending in 9 and 0); BLKNUM writes increasing numbers into an attribute of the blocks you pick; INSERTINDEX places copies of an attributed block in a grid from a CSV with a specific column layout.

How to use it

  1. Load number.lsp with APPLOAD.
  2. Type TEXTTOCSV at the command line.
  3. Select the TEXT and MTEXT objects of the table and press Enter.
  4. Enter the row tolerance, or press Enter for the default.
  5. Choose the CSV file name and location in the dialog.

Notes and limitations

  • It writes a CSV file to disk; choosing an existing file name overwrites it. INSERTINDEX also reads a chosen CSV and adds block copies to the drawing.
  • MTEXT formatting codes (\P, {\f...} and so on) are exported as is; for MTEXT longer than 250 characters only part of the text may be written.
  • Columns come only from X order, not from cell boundaries, so empty cells are skipped and columns can shift. The text insertion point is used as its position.
  • NUMCOPY's rule of skipping numbers ending in 9 and 0, and INSERTINDEX's fixed CSV columns (2, 3, 6, 10) and NAME-ENG-INDEX tag, are specific to the author's own workflow.
  • The file is UTF-8 encoded with Chinese prompts; in older AutoCAD versions the prompts may appear garbled. The CSV character encoding depends on the program's settings.
  • License: the repository's LICENSE file is MIT.
  • The repository was published in 2026 and the amount of testing is not stated; try it on a copy of the drawing first.

Source and license

This tool is not made by eplisp. The file is published unchanged under its author's license; copyright stays with the author.

References

  1. Source repository: ddddo86/AutoLSP – https://github.com/ddddo86/AutoLSP
  2. Author: ddddo – https://github.com/ddddo86
  3. License: MIT – https://github.com/ddddo86/AutoLSP/blob/d3c474625988ff2ce6a0c6c0b9e1d58ff8559b17/LICENSE

Found a mistake, or are you the author of this tool? Request a correction or removal