Cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with exchanging data between Excel and data table in Femap

Builder
Builder

 Hi,

 

When I copy element ID numbers from Excel and paste them in Femap to create a data table, the ID numbers in the data table are getting resorted automatically,… that would make it impossible to bring the results and paste them back in excel in front of the same element ID numbers,… is there a way to fix this issue?

 

Thanks,

Aero1

 

4 REPLIES

Re: Issue with exchanging data between Excel and data table in Femap

Genius
Genius

Do the IDs have to be in a specific order in Excel?  You could do a sort on the IDs in Excel.  They should then match up with the order in the data table.  If sorting the IDs in Excel is not an option, you can always just dump the data from the data table to an extra worksheet and then use the "vlookup" function to populate the data in the unsorted list.

Re: Issue with exchanging data between Excel and data table in Femap

Builder
Builder

Thanks for your reply, yes, they need to be in a specific order in excel. I can do the sort in excel, bring the data from Femap and then undo the sort or I can use the lookup function but I was trying to avoid taking these extra steps,... I was hopeing to find an option in Femap that would ignor the sorting feature,... I think femap should list the results in the same order entered in the entity info. menu,...

 

Is it possible to copy/paste the element ID numbers in the "API programming" menu and program Femap to list the required output data into the data table in the same order that ID numbers were pasted in the program,...?

Re: Issue with exchanging data between Excel and data table in Femap

Genius
Genius

Yes, you could use the "Select" method of the "Sort" object to capture and maintain the order of the IDs.  After that you could write the IDs along with whatever values you want to unsorted arrays.  The array information can be placed into the data table using the "AddColumn" method of a DataTable object.

 

If you're going the API route, another option might be just to write a script that writes the data directly to Excel.  The API could read the IDs from Excel or take an input range from Excel and then write the data at the appropriate locations.

Re: Issue with exchanging data between Excel and data table in Femap

Builder
Builder

That would be great!, is it possible for you to send me a few sample API routines that can do such a thing? Instead of pasting the IDs in Femap element selection dialog box,... can I just directly paste them in the body of the API routine or maybe in another VBA module? I guess that would be easier than reading data directly from excel?