Exporting Tables to Excel in Batch

Exporting Tables to Excel in Batch

paul.trotter
Explorer Explorer
6,752 Views
18 Replies
Message 1 of 19

Exporting Tables to Excel in Batch

paul.trotter
Explorer
Explorer

Hello,

 

I have about 500+ drawings (Piping Isos) that each have 1 AutoCAD Table inside (BOM Data).

 

I'm trying to find a way to automate the process of exporting all these tables to individual Excel Files.


I realize I can use the TABLEEXPORT command to do one at a time, but does anyone know of a way (perhaps with script, LISP, etc) to do this in batch?

 

Thanks so much.

0 Likes
6,753 Views
18 Replies
Replies (18)
Message 2 of 19

john.vellek
Alumni
Alumni

HI @paul.trotter,

 

I was about to move this to the Customization forum but then I thought that perhaps you could right a macro with the Action Recorder that could do this.  Please try this and if you would like to share some sample files I can do so on my side too.

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 3 of 19

TerryDotson
Mentor
Mentor

If you were to consider third party software, we are overhauling the Table Export functionality in our XL2CAD product for a near future version.  The old tool simply took a single picked table and exported it to the currently opened spreadsheet.  The new approach will let you select any number of drawings (including adding the root folder of a drive and all subfolders), and it will process all TABLE objects in each drawing and create a companion spreadsheet file in the same folder as the drawing (with an XLS(x) extension).  Unlike scripting, it will not open the drawing in the editor and will process very fast.

 

If you are interested, email dotson (at) dotsoft (dot) com or use the forum private messaging.

Message 4 of 19

john.vellek
Alumni
Alumni

Hi @paul.trotter

 

Did you try the action recorder to perform this action?

 

If you would like to send me a sample file I am happy to try this on my side to see if it works in this fashion.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 5 of 19

paul.trotter
Explorer
Explorer

Thanks Terry & John for the offer to help!

 

John, I tried the action recorder, but since the tables were different sizes in the various drawings and it doesn't seem like you can do a 'select all' to highlight a table, I didn't have much luck.

 

Terry, I would definitely be interested in purchasing your tool the next time this task comes up for me. I've purchased your stuff at my previous company and it was solid.

 

I went ahead and manually exported all the tables this time since the project needed this info ASAP, but it was painful enough that I won't do it manually again!

 

Thanks all

Message 6 of 19

john.vellek
Alumni
Alumni

Hi @paul.trotter,

 

One last thought on this issue before I move it to the other forum for you. Have you considered using Dataextraction to export the BOM data and not the table? Perhaps then you could use -EATTEXT to get the required output easily.

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 7 of 19

paul.trotter
Explorer
Explorer

John, I did explore using the -EATTEXT command, but wasn't successful in getting the table contents to export, only the table properties. Thanks!

 

0 Likes
Message 8 of 19

john.vellek
Alumni
Alumni

Hi Paul, I was thinking of skipping the tables in this process altogether and just grabbing the pertinent BOM data from the model.  Can you share a file so I can try this on my side?


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 9 of 19

Anonymous
Not applicable

Hi Paul!

 

Could you upload a few of your drawings (lets say 5 DWGs) so I could take a look at them I try something out with my scripting skills...

 

Kind Regards

0 Likes
Message 10 of 19

paul.trotter
Explorer
Explorer

@john.vellek

 

@Anonymous

 

I created 3 test drawings (each with a different table)

 

please see attached

 

thanks!

0 Likes
Message 11 of 19

Anonymous
Not applicable
Hey guys,

No progress on this topic?!

Thanks
0 Likes
Message 12 of 19

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

I was not able to get a script to work to export each table to a file.  My angle on this would be to run dataextraction on all the proper files to create a BOM right in Excel and to skip the export process all together.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 13 of 19

cadffm
Consultant
Consultant

@Anonymous

why should? The 3rd. posting is one possible solution of the topic, but not the only.

 

Only three samples of google hits when i am searching for AUTOCAD TABLEEXPORT LISP or something like that.

 

www.  google. com < Links 1-3 inside HTH - for fullversion of AutoCAD&Verticals

 

(for LT you have to search for the right 3.part program, that more complicated. Or if you a Pro with Texteditors and Excel: Explode the table, use LIST command)

Sebastian

0 Likes
Message 14 of 19

Anonymous
Not applicable

@john.vellek 

You are definetly right, directly at the time of DWG creation, one should also export the BOM into excel (we are still speaking here of course about the Isos example). However, we have a problem now that the DWGs are created without creating the corresponding BOMs in excel and that's why we are looking for a solution to get the BOM from the already created DWGs. 

 

@cadffm

 

I am not sure if posting 3 is really a solution for what we want. We will try to write a LISP or adjust a written one for this purpose.

0 Likes
Message 15 of 19

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

Is the data contained in a table within your dwg? If so, you should be able to export it to an Excel file.

 

Capture.PNG

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 16 of 19

Anonymous
Not applicable

Yes, @john.vellek

 

However, we have 700 DWGs and we want to do a batch export of all tables at once to excel (different excel files or a single file).

0 Likes
Message 17 of 19

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

I understand but unfortunately, this is not a built-in feature of AutoCAD. You might check Terry's post (#3) to see if his utility will help.  His programs are clean and work well at a minimal cost.

 

t sounds like the tool he describes is exactly what you are looking for.

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 18 of 19

bgumPXZJF
Advocate
Advocate

I can confirm that the XL2CAD function mentioned in post 3# worked. However it creates an Excel File for each....
Also the link in post #13 looked promising. Here is the link for redundancy.

0 Likes
Message 19 of 19

TerryDotson
Mentor
Mentor

I can confirm that the XL2CAD function mentioned in post 3# worked. However it creates an Excel File for each....

The Table Export tool in XL2CAD allows the user to select multiple drawings.  It then creates one excel file for each drawing.  If any one of those drawings contain multiple tables, each table is placed on its own sheet inside the workbook.  In other words, if a drawing contains 20 tables, the resulting Excel file will contain 20 sheets.

 

It seemed the only way to logically organize potentially thousands of tables inside hundreds of selected drawings.

0 Likes