Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4336 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi, I have a recurring import of Excel spreadsheets in .tab form where the data is in a 2d array with the first record being the job name in each column and the rows containing the data category in the first field and an amount for each column in each field after that. I do not know in advance how many columns are in the spreadsheet or what their values are. Ideally the job name would be another field in each row and every amount would have a category and job name in its row. Is there an easy way in FM to manipulate this arrangement and convert the 2d array into a list with the category, amount and job name listed for each record? The table 2d Excel array cannot be editied in Excel or any other program. All conversion must happen in FM12 after import. I would upload an example but apparently .tab files aren't allowed. Thanks in advance for any tips.

 

 

Posted

I'm having trouble visualizing this... can you zip the tab file and upload it, reduce it maybe to 5 or 10 records or so.  I think the upload issue was more size than file type.

 

The fact that you don't know how many columns there are makes it difficult because you can not dynamically create fields in FM (at least not easily).  So it would seem to me that you need to do some pre-processing outside of FM before bringing it in.  Is this Windows, Mac or both?

Posted

so each record in FM would be the equivalent of one cell in that table, with 3 fields:

 

 

51201 · Executive Producer, 0, 201SJ

 

51201 · Executive Producer, 0, X00TD

and so on...

 

Problem remains that you don't know how many columns there will be in any one import.  You could preset it to a hug number, say 1,000.  Although if the source is Excel 2033 it could never have more than 256 columns.  But say 1,000

 

You would then import your summary table into a FM table and loop through each cell and create a new record for it in your final FM table.  Not very pretty but entirely doable.

Posted

Thanks for looking Wim. I was hoping someone had a trick up their sleeve for this to avoid the long looping script. I guess I will have to bite the bullet.

This topic is 4336 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.