(API) Macro for dumping all opened tables in Robot (with all tabs) to Excell

(API) Macro for dumping all opened tables in Robot (with all tabs) to Excell

Rafal.Gaweda
Autodesk Support Autodesk Support
6,790 Views
19 Replies
Message 1 of 20

(API) Macro for dumping all opened tables in Robot (with all tabs) to Excell

Rafal.Gaweda
Autodesk Support
Autodesk Support

Macro for dumping all opened tables in Robot (with all tabs) to Excell

Wait patiently until "Dumping finished" message appears on screen

 

ANSI csv files are stored in windows %temp% (loaction can be changed in macro if one wants) so they can be reused if needed 

 

(if files are not properly open in Excel, open VBA editor and play with code changing separators characters, relevant code marked in macro)



Rafal Gaweda
Accepted solutions (1)
6,791 Views
19 Replies
Replies (19)
Message 2 of 20

Rafal.Gaweda
Autodesk Support
Autodesk Support

Newer version in attachment



Rafal Gaweda
Message 3 of 20

Rafal.Gaweda
Autodesk Support
Autodesk Support

Corrected opening files in Excel



Rafal Gaweda
Message 4 of 20

ledinhchinh0409
Advocate
Advocate

hi. @Rafal.Gaweda

Thank you, this is very helpful. But can export results in the 'sheet' in an excel file instead of the 'excel file'  as it is now?

0 Likes
Message 5 of 20

Rafal.Gaweda
Autodesk Support
Autodesk Support

Hi @ledinhchinh0409

 

Here you are



Rafal Gaweda
Message 6 of 20

ledinhchinh0409
Advocate
Advocate

hi. @Rafal.Gaweda

Thanks very much. However when I export to excel it does not have the desired format.

0 Likes
Message 7 of 20

Rafal.Gaweda
Autodesk Support
Autodesk Support
Accepted solution

Hi @ledinhchinh0409

 

Try attached.

If it does not work as you expect please change List Separator in Windows Regional Settings onto ";"



Rafal Gaweda
Message 8 of 20

piperr
Advocate
Advocate

This is amazing @Rafal.Gaweda !!!

0 Likes
Message 9 of 20

ledinhchinh0409
Advocate
Advocate

@Rafal.Gaweda

It worked very well. Thank you very much!

0 Likes
Message 10 of 20

Muhammed.OPERA
Advisor
Advisor

That's very useful, amazing @Rafal.Gaweda

Keep on Smiley Happy


Muhammed Mamdouh (OPERA)
Structural Engineer, Instructor
Facebook |LinkedIn

EESignature

0 Likes
Message 11 of 20

jmmarin
Advocate
Advocate

Thank you. It is very useful!!

0 Likes
Message 12 of 20

WALIDGIO
Advocate
Advocate

it does't work for my ROBOT 2025 and excel 2021

any way to fix it ?image.png

0 Likes
Message 13 of 20

Stephane.kapetanovic
Mentor
Mentor

hi @WALIDGIO 

you need to create Robot tables so that the program can read them

Best Regards

0 Likes
Message 14 of 20

LionelDallenne
Contributor
Contributor

Hi @Stephane.kapetanovic ,

 

As you said, robot tables need to be created so that the program can read them. However, it also only works when the table are visible and shown in Robot. Any ideas how to automate this? To make it more tangible, I would need the following table for instance to be retrieved (Results - Forces), hence autoatically opened in Robot.

 

Table Forces.jpg

Thanks!

0 Likes
Message 15 of 20

Stephane.kapetanovic
Mentor
Mentor

hi @LionelDallenne 

Here is a brief example of the use of tables for the extraction of forces in bars

Best Regards

Stephanekapetanovic_0-1724296307450.png

 

Message 16 of 20

LionelDallenne
Contributor
Contributor

Thanks @Stephane.kapetanovic 

 

It seems I'm now able to create the table I need within Robot.

 

Thanks for your help so far.

Message 17 of 20

HoshangMustafa
Advisor
Advisor

Hi @Stephane.kapetanovic 

I tried your excel file without success

HoshangMustafa_1-1724398476855.png

 

0 Likes
Message 18 of 20

Stephane.kapetanovic
Mentor
Mentor

hi @HoshangMustafa 

no problem here, are you sure you authorized the workbook macros when you opened it?

Best Regards

0 Likes
Message 19 of 20

LionelDallenne
Contributor
Contributor

Hi @HoshangMustafa,

 

please make sure as well to unblock the Excel file in the file properties in Explorer.

 

Best regards,

0 Likes
Message 20 of 20

Stephane.kapetanovic
Mentor
Mentor

hi @LionelDallenne 

this is not the case it is an excel 97-2003, so no additional blocking

Best regards

 

0 Likes