I'm trying to create an app that allows you to enter information about a food recipe with variables for the name, instructions, nutrition facts (calories, fat, etc. - all stored in separate variables). These recipes would be stored in a file (xls?) and could be accessed later by a different app that would manipulate the data.
The issue I'm having - since recipes have different numbers of ingredients, I am running into trouble making a function that stores each ingredient in a way that makes them easily accessible later.
- I am using writecell with 'WriteMode' 'append' (so that each new recipe is stored beneath the last on the spreadsheet)
- However, since ingredients are stored in a cell, it will not allow me to store nested cells
- To remedy this I then tried 'strjoin(ingredients)' which worked and gave one value that represented all ingredients in each recipe. However, doing it this way will make it very difficult to find the values later.
- Another thing I tried was attaching a tag to each ingredient (e.g., ,&bananas,&oranges). My idea here was that I could then search the list for all instances of ",&" and arrive at the ingredients. However, this won't differentiate which recipe the ingredient belongs to, since the recipe list is becoming a 300+x1cell that's just a long line of these values.
Essentially where I'm stuck is that I am generating cells with varying lengths and unsure of the best way to store these into a database for later reference.