OuluChris 发表于 2022-7-7 13:34:48

Format small table (imported f

Hi,
 
I'm trying to import four cells from Excel that will be a small table. The four cells each contain a numerical value.
 
I've read a bit about this and decided that the PASTESPEC command was most appropriate. I then select "paste link" and "AutoCAD entities".
 
This works fine. The cells are imported and the values automatically update whenever the Excel file is changed.
 
However, because of the formatting style of the Excel sheet, the four cells are not always the same size, have different borders, etc.
 
With my first test import I modified each cell in AutoCAD (cell width, cell height, alignment, borders, margins, etc) so that it looked good.
 
So far so good.
 
When I import a second value once again the various cell properties are wrong. I want it to be formatted like my first test import but no amount of reading about this has yet revealed a way to do this. MATCHPROP doesn't seem to do anything!
 
There are potentially a hundred or so of these four cell groups to import so modifying every cell, as I did with the first one, is definitely not on the cards.
 
My question is in two parts:
 
(1) Is there a way to quickly format new imports so that it looks exactly like my first test?
 
(2) Is it possible to create a 2-row 2-column table in AutoCAD, define all the parameters that I want and lock them, and then copy and paste (or another method if necessary) my information from Excel?
 
Many thanks,
 
 
Chris

RobDraw 发表于 2022-7-7 13:51:44

This is possible using tables/data link in AutoCAD to import the data from Excel. A table style can be used for consistent formatting.

OuluChris 发表于 2022-7-7 14:03:00

 
As far as I can tell the data link is created automatically when using the PASTESPEC command.
 
 
Would you have any idea, and if so would you be willing to share, how to create such a template?
 
Thanks,
 
 
Chris

RobDraw 发表于 2022-7-7 14:07:33

The style is created and used with the table command. Check it out and come back with any questions.

ReMark 发表于 2022-7-7 14:18:36

Oulu: A table created via a DATALINK is not the same as using the PASTESPEC command.

Ski_Me 发表于 2022-7-7 14:26:04

I think what the OP is saying is that the formatting of the table is different than what it is in excel.The data is fine but the format is not what he wants.Oulu look at creating a table style in autocad that suits your needs and use that every time.If you create a template, meaning that every time you start a new drawing you start with a drawing template, save that table style in the template you make.It takes some work but in the end you will save yourself a lot of time.There are tutorials here about creating templates and people here that will help get you started.

RobDraw 发表于 2022-7-7 14:43:23

I've had to edit my posts to say (table) style instead of template. Sorry for the misuse of terminology and any confusion it may have caused.
页: [1]
查看完整版本: Format small table (imported f