The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Write CSV of all attribute names from a lot of files
I'm trying to create a process for ingesting a lot of different excel files with varying formats and attribute names. I have created a small "attribute dictionary" that maps a number of different attribute names to the standardized versions that I need to move them to (i.e. Phone, phone, phone #, telephone, all get renamed to Phone). But there are 95+ different files that I need to account for (and hundreds more behind that) in order to ensure I have as many different formats covered as possible.
I have used the Loop Files operator and have a nice little macro and log subprocess in there but I can't figure out how to pass an entire set of attributes through to a csv especially when the number of attributes changes from one file to the next (lots of extraneous columns in some files).
How do I create a csv consisting of just the first row of each excel?
I have used the Loop Files operator and have a nice little macro and log subprocess in there but I can't figure out how to pass an entire set of attributes through to a csv especially when the number of attributes changes from one file to the next (lots of extraneous columns in some files).
How do I create a csv consisting of just the first row of each excel?
Tagged:
0
Answers
It's simple.
- First, Transpose the Excel file.
- Then, Select Attributes with the id.
- Finally, Write Excel or whatever you want to do.
Here is how it looks. Notice I am using "Create ExampleSet" because I am lazy and I don't want to generate an Excel file:Here is an example XML for you:
Rodrigo.