Hi I have a two dementioned array ie myArray(10,10).
How can I create XML quickly from the values in this array without looping round the array?
Thanks
Paul
Printable View
Hi I have a two dementioned array ie myArray(10,10).
How can I create XML quickly from the values in this array without looping round the array?
Thanks
Paul
You can't.
In other words, even if there is a function that does this, internally, it's still using loops...
This type of question is asked a lot latelly.... that the anser is obvious... if there is something with many items... it means you need a loop.
you can create a CSV file, which can be opened by excel
each Print statement prints a new line in the fileCode:Open "myfile.csv" For Output As #1
For i = 0 To UBound(the_array)
Print #1, the_array(i, 0), ",", the_array(i, 1), ",", the_array(i, 2), ",", the_array(i, 3), ",", the_array(i, 4), ",", the_array(i, 5), ",", the_array(i, 6), ",", the_array(i, 7), ",", the_array(i, 8), ",", the_array(i, 9)
Next i
Close #1
Of course there are many ways to do what he wants but he stated "without looping round the array".Quote:
Originally Posted by unxzst
oh LOL you're right, i should pay more attention.Quote:
Originally Posted by MartinLiss
let me know if you guys find a way :wave:
You could write out the area of memory the array resides in but a) it's really still looping around the array, just in a different way and b) the resultant file would probably need some heavy coding to read.
You CAN scratch your left elbow with your left hand, but the medical bills, pain and recovery time for a broken arm make scratching it with your right hand much more sensible.
Ok thanks for your help anyway.