I have a drawing with 40 excel data link, all linked to one spreadsheet excel file. It's there anyway to change the excel file in all the data links at the same time without having to go to Tools -- Data Links -- Data Link Manager -- right click edit on each one to change the excel file? Any lisp routine or solution will be greatly appreciated.
First you need to open your Excel worksheets that are linked to your autocad drawing. Then open the drawing with the table(s). Now, when you double pick the table, the Excel worksheet will pop up and you can make the change(s) that you want and they will be reflected in the drawing as well as in the worksheet. See the attached.
Thanks, but that's not exactly what I’m looking for. When I go to:
- Data Links
- Data Link Manager
Under --Excel Links—I have already created 40 different excel links with different content on them and from the same excel file. So each one of the 40 excel link takes a different group of cells of the same excel file. When I want to change the excel file that the 40 excel links are linked to, I have to go to:
- Data Links
- Data Link Manager
-Double click on ONE excel link
-under Choose and Excel File, change the excel file to the New created excel file.
-press ok. And proceed to do the same steps with all 39 left excel links.
It’s almost like just opening the excel file from a CAD excel data link, doing a SAVE AS, changing the name and, as a miracle, having all Cad excel links adapt to the new name. (When I do a SAVE AS all 40 data links are still linked to the original, not to the new saved excel file)
If I understand this correctly, you have 40 Data Links to a single Excel file.
You then create a new excel file (presumably with a new name).
You then have to update each Data Link individually to match the new filename.
I can understand why you think this is long winded!
Have you tried repathing the Data Link in Reference Manager?
I am assuming that the XL files are very updates to a newer revision. if that is the case then I would look at your file naming convention. If you have revision numbers on the filenames (xx1.xls xx2.xls etc) then look at having a filename for the latest release only (xxcurrent.xls) then simply archive the previous release and rename the newest to this name prior to opening the drawing.
I find this a good practice with XRefs as well, rather than repathing several drawings to the latest version have a fixed location and name for the latest and replace it when required.
Thanks for trying to help.
I took care of the problem by selecting "Relative Path" under "Path Type" in the Data link menu and just moving the drawing with the Excel file to separate folder. That way:
-Templates can be all linked to one Excel file, and when making a New drawing using the templates I just have to copy the Excel file in the folder of the New drawing.
- Same Excel file name in all folders which makes things a little difficult to target one. But as long as they are in the same folder or subfolder as the New drawing, everything is good!
I know maybe some of you did know about "Relative Path", it's hard to explain the whole problem on the Web.