Nils, that did the trick (stopping and starting - I also had a couple of typos). I have already read in about 100 of the 400 variables but I have encountered a couple of issues related to VBA (not Julia) , which may require a re-think of the best way to handle the input file. I would value your opinion, as my ultimate goal it to present the problem to the Julia ODE solvers (and ultimately the optimizing engine) in the best way possible:
-
The maximum number of line continuations in a VBA write/print statement is 25, which is not enough to write all my values on one line. I could possibly join to files together or write the headings and data to a spare spreadsheet in two rows and then read it back into another file that I ultimately present to Julia … bit messy and in any case, suffers from the problem 2 below.
-
When I write the headings and one line and the data(values) on the line below there is no visible correspondence, as the headings are much longer than the values - basically kills my idea of having an editable data file. This was not so much of a problem when I wrote multiple lines to the file , as the correspondence between headings and values was retained.
-
If I write the data into two columns (headings in one column and data in the other column) can I still retain the struct format that you say is valuable for presenting to the ODE solver, This file format is essentially a table, which would be the most easy to edit. I think I would need your help on how to read in this file and set up a struct, assuming it was possible?
-
Note I have completed the Dictionary method that Florin outlined, so I guess this is an option for presenting and unpacking data for the solver? If it is not as good as struct or offers some limitations, then I am all for taking the best route to achieve the ultimate result.
Again many thanks for all of the help and setting me straight on many concepts. I liked the splatting explanation. Peter