Question for the community; I am extracting data from a specific row location in an excel table through an assign of var = row.item(3).ToString; The value it is pulling from the excel table has several values in it; For example purposes lets say Cat, Dog, Chicken, Bird, Fish are all viable options; So the value being extracted will look like “Cat, Dog, Chicken, Bird, Fish”; I am looking to split these values and store them into their own variables; Currently doing this by an assign of stringArray = var.Split(CChar(", ")); Works like a charm, I can call each array value with no problem;
Each row of this excel document in that specif column can contain different values; Ex below
- Cat, Dog, Fish
- Chicken, Bird
- Dog, Fish, Chicken, Bird
I tried initializing variables as place holders in the event a “max” length String was entered after split (for this example purposes max would be 5 placeholder vars). Doing this throws an Error, “Index was outside the bounds of the array.”
Q: How can I loop through this String Array and dynamically allocate new variables as needed?