Hi all
I work whit MashZone, I need show in a table the values of a excel file every day, but this file one day has 8 columns and n-rows, another day has 5 columns and n rows, another day has 12 columns and n rows and so on, the file have dynamic columns
How I can do to work with the dynamic columns in MashZone ?
Thanks
Josue
Assuming that you know the full set of expected column names, a data feed can be created to handle this, using crosstab.
I can't upload a picture quickly, but let me describe the steps:
- One of the columns of data in the Excel spreadsheet must be there every day and must be a unique identifier for the row.
- If that's missing, add a column of unique IDs every day before you upload to the server.
- The unique ID must be in the first column of the spreadsheet for this to work.
Create a data feed with the following operators:
- Source MS Excel, Crosstab, Horizontal iteration from row 1, Values from row 2.
- Copy Feed (string together Copy Feed operators to accomodate the number of possible columns you ever expect)
- For each column, repeat the following:
- Filter Values, Horizontal Iteration = <Expected Column Name>
- Delete Columns Horizontal Iteration
- Rename Columns Values --> <Expected Column Name>
Then use Combine Feed operators on Vertical Iteration = Vertical Iteration to re-combine each column in turn.
Finally, use a Rename Columns operator to rename Vertical Iteration back to the name of the unique ID column in your source, or ignore it if you added it yourself in the first place.
So now if a column is not supplied one day, the values in that column will be blank in the output of the feed, but the column will always be there.
I can't help on a dynamic table in the display, perhaps someone else can help with that bit.
Andy