0

I'm trying to copy a range of cells from an Excel 2010 spreadsheet and paste them into a table in AutoCAD LT 2016. My problem is Excel applies formatting information to each of the cells. AutoCAD uses this formatting to override its styles on a cell-by-cell basis, so my table doesn't conform to design standards.

What I would like to do is remove all formatting from the Excel file as could be done in Excel <97. Failing that, if there was a clipboard utility that stripped formatting from the table (but left cell merge information) that would be an acceptable alternative.

I've tried cutting and pasting from Google Docs and LibreOffice, but AutoCAD interprets their clipboard objects differently, and doesn't create a table from the data when pasted.

I've seen some LISP routines that will scrub this formatting within AutoCAD, but since my employer runs LT, these aren't available to me.

Any ideas?

1
  • 2
    Have you tried to copy, paste without formatting on an empty sheet, copy again and paste into AutoCAD? Jun 3, 2015 at 11:19

5 Answers 5

1

To remove all formatting, select the cells in question and from the Ribbon click:

Home > Editing > Clear > Clear Formats

0

Cheap and cheerful workaround:

Have you tried copying a column into notepad, and then copying from notepad to Autocad?

You might even be able to just copy the whole table into notepad and then into autocad (I don't have it so I haven't tried it), but most likely it will just import each row into one cell with a bunch of tab characters, and you'll have to do it column by column.

I assume that you have already tried "paste values" into another sheet and then copying from that sheet? If you do that does it copy "calibri, size 10" or whatever excel's default style is set to instead of plaintext, or does it work?

Hope one of these helps

0

If you want to clear all formats from a worksheet, but retain cell merging, then:

  1. copy the worksheet
  2. clear all formats in the copy (this will also un-merge cells)
  3. re-merge cells in the copy based on the merged cells in the original

This short macro will do this:

Sub qwerty()
   Dim orig As Worksheet, r As Range
   Dim neww As Worksheet
   Set orig = ActiveSheet

   ActiveSheet.Copy After:=Worksheets(Sheets.Count)
   Set neww = ActiveSheet
   Cells.ClearFormats
   For Each r In orig.UsedRange
      If r.MergeArea.Address = r.Address Then
      Else
         neww.Range(r.MergeArea.Address).Merge
      End If
   Next r
End Sub
0

Just in case someone else finds this, I would recommend making a datalink (in AutoCAD) to the Excel file. After you choose the Excel file (use the DATALINK command), there is a devilish little expand arrow that appears on the lower right side, which when clicked on reveals a checkbox with "Use Excel formatting". Uncheck this box and you will have a format closer to what you were expecting. Quite difficult to find, but it solved most of my issues with the formatting.

Source: https://forums.autodesk.com/t5/autocad-forum/data-linked-excel-table-formatting/m-p/8987616/highlight/true#M991073

0
  1. Copy from Microsoft Excel.
  2. Paste to LibreOffice Calc (Paste Special -> Unformatted Text).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .