AutoCAD – Drawings

Export AutoCAD to Excel: why the CSV loses accented text, and how to get a clean .xlsx

Export AutoCAD to Excel with TABLEEXPORT and the CSV loses accents; Ctrl+V gives only a picture. DATAEXTRACTION writes an .xlsx with the right text and counts.

  • TS. Đỗ Quốc Hoàng
  • 8 min read
Four pages of the DATAEXTRACTION wizard in AutoCAD 2027: select objects, select properties, refine data and choose output Photo: Screenshots of AutoCAD 2027

The door, column and rebar schedules are already in the drawing, and now they need to go into Excel for further calculation or for the tender file. Retyping is slow and error-prone. There are three ways to export AutoCAD to Excel, but only one keeps accented text intact. This article tries all three on the same drawing, whose table holds Vietnamese text such as "Tường 220" and "Cột 300x300", then opens each output file to see what survived.

For the whole craft of building schedules and taking off quantities from drawings, the Institute runs an AutoCAD course for construction.

Three routes, three results

RouteCommandResult in Excel
Export a table to CSVTABLEEXPORTCells, but accented characters lost
Select the table, Ctrl+C, then Ctrl+V in ExcelCOPYCLIPOne picture of an AutoCAD object, no cells
Extract data to an .xlsx fileDATAEXTRACTIONCells, accented text intact

The sections below take each route in turn, with results read from the actual output files.

The TABLEEXPORT command: quick, but it drops characters

TABLEEXPORT writes an AutoCAD table to a CSV file. It asks Select a table:; pick the table and the Export Data dialog opens for the file name.

That dialog always appears, even with FILEDIA set to 0. Unlike many commands, it never asks for the file name on the command line, which matters if you plan to script it.

The sample table has four rows: the title BẢNG THỐNG KÊ merged across three cells, a header row, and two rows Tường 220 and Cột 300x300. Read back inside AutoCAD, the cells hold the accented text correctly. The exported CSV reads:

"B?NG TH?NG KÊ", ,
"Tên","S? lu?ng","Chi?u dài"
"Tu?ng 220","12","3450.5"
"C?t 300x300","8","3300"

The file is written in an old ANSI code page, not Unicode. Any character outside that code page becomes ?: "Tường" turns into Tu?ng and "Cột" into C?t. The characters are gone from the file itself, so no Excel import setting can bring them back. The merged title comes out as one text cell and two empty ones.

For tables with only numbers and unaccented text, TABLEEXPORT is fine. With accented text, take another route.

Ctrl+C then Ctrl+V: Excel gets a picture, not numbers

Select the table in AutoCAD, Ctrl+C, then Ctrl+V in Excel. Excel does not paste cells; it pastes an embedded AutoCAD object with the identifier AutoCAD.Drawing.26. Cell A1 stays empty. You see the table but cannot sum, sort or calculate anything.

This only suits showing a table as an illustration on a sheet. Pasting into Word behaves the same way; see copy AutoCAD to Word.

The DATAEXTRACTION command: eight pages to an .xlsx file

The DATAEXTRACTION command, alias DX, is the right route. The Autodesk documentation says it "Exports object property, block attribute, and drawing information to a data extraction table or to an external file." The 2027 interface file places it at Annotate → Tables → Extract Data and Insert → Linking & Extraction → Extract Data on the ribbon, and Tools → Data Extraction in the menu.

First condition: the drawing must be saved. Run it on a drawing that has never been saved and AutoCAD shows a "Data Extraction - Unsaved Drawing" box with just Save and Cancel instead of the wizard.

The data extraction wizard has eight pages, named verbatim on the 2027 release:

PageNameWhat to do
1BeginChoose Create a new data extraction, click Next, name the template file (.dxex)
2Define Data SourceLeave the default to use the current drawing
3Select ObjectsChoose which object types to extract
4Select PropertiesChoose the properties, i.e. the columns
5Refine DataCombine rows, sort columns
6Choose OutputTick Output data to external file (.xlsx .csv .mdb .txt) and set the path
8FinishClick Finish; the Excel file and the .dxex template are written now

The sample drawing has a block COT inserted three times and a block CUA inserted twice, all on a layer named "Tường". The .xlsx file has a sheet named Summary, and its Layer column reads "Tường" exactly, accents intact. That is the decisive difference from the TABLEEXPORT CSV.

An AutoCAD table to Excel, trimmed down

Left at the defaults, the Excel file is hard to use. From the sample drawing:

DefaultEffect in the .xlsx file
Page 3 ticks every object typeBesides the COT and CUA blocks, it lists the Line and Polyline objects inside the blocks
Page 4 ticks every property52 columns, including file name, creation date, file size and coordinates
Each block has different coordinatesOne row per block with Count = 1, even with Combine identical rows ticked

To get a clean count, trim it inside the wizard:

  1. Page 3: untick Display all object types, then choose Display blocks only.
  2. Page 4: the Category filter on the right has five groups: 3D Visualization, Drawing, General, Geometry, Misc. Untick all but General. Geometry holds the coordinates, so it must go.
  3. Page 5: leave Combine identical rows and Show count column ticked.

Run again on the same sample, the .xlsx drops to 2 rows and 9 columns:

CountNameLayer
2CUATường
3COTTường

With no coordinate columns, same-named blocks match in every column, so they merge into one row and Count gives the right number.

Three things that confuse newcomers

Next is greyed out on page 6. Both output boxes, Insert data extraction table into drawing and Output data to external file, start unticked, and Next stays disabled until you tick one. Tick the second, then use the three-dot button to choose where to save and the format.

Page 3 filters to objects in use by default. Display objects currently in-use only is pre-ticked, so the list shows only object types present in the drawing. For the sample it had exactly four rows: COT, CUA, Line, Polyline. If a type seems missing, check this box first.

The Excel file is written at Finish, not before. Page 8 says so: "Any external files to create will be created when clicking Finish." Cancel before Finish and no file is written at all.

Step by step: a block count in Excel

The whole route for a block count, from a saved drawing to an Excel file:

  1. Save the drawing if it has never been saved.
  2. Type DX. On page 1, keep Create a new data extraction, click Next and name the template.
  3. On page 2, click Next to use the current drawing.
  4. On page 3, untick Display all object types, choose Display blocks only, and keep only the blocks you want counted.
  5. On page 4, in Category filter, keep only General; click Next.
  6. On page 5, leave Combine identical rows and Show count column ticked; click Next.
  7. On page 6, tick Output data to external file, click the three-dot button, choose .xlsx and a file name.
  8. Click Next, then Finish on page 8.

Open the file in Excel: one row per block name, with the count in the first column. To refresh it after the drawing changes, start again from page 1 with Use previous extraction as a template and the saved .dxex file.

Which route for which job

JobUse
Table with accented text, numbers needed in ExcelDATAEXTRACTION, output to .xlsx
Table with numbers and plain text onlyTABLEEXPORT to CSV, quickly
Just a picture of the tableCtrl+C, Ctrl+V
Point coordinatesCoordinate export LISP
Bringing Excel data into the drawingCoordinate import LISP, or DATALINK

The command-line version -DATAEXTRACTION only asks Enter the template file path for the extraction:, so it needs a template saved by the wizard. The wizard saves a .dxex template itself when you click Finish; the sample's was 24 KB. Page 1 also offers Use previous extraction as a template to start from that file next time. Related field and data commands are covered in the FIELD command.

Frequently asked questions

How do I export AutoCAD to Excel and keep accented text?

Use DATAEXTRACTION and choose Output data to external file as .xlsx. The file keeps all accents.

Why does TABLEEXPORT lose accented characters?

The CSV is written in an old ANSI code page. Characters outside it become ? as the file is written.

Why does pasting an AutoCAD table into Excel give no numbers?

Ctrl+V in Excel pastes an embedded AutoCAD object, not cells.

Why does DATAEXTRACTION say Unsaved Drawing?

The drawing has never been saved. Save it, then run the command again.

Why does the Excel file have so many columns and rows?

By default every object type and every property is extracted. Trim them on pages 3 and 4 of the wizard.

Can DATAEXTRACTION run from the command line?

Yes, as -DATAEXTRACTION, but it needs a .dxex template saved by the wizard.

About the author

TS. Đỗ Quốc Hoàng — Vice Director of the Institute of Information Technology in Civil Engineering, Hanoi University of Civil Engineering, and a specialist in software development for construction