I've got a program in C that creates a 2 dimensional array pN with dimensions of [nt] and [nx]. I need to export the array to excel, so I can do useful math on it.
I can get the fwrite command to save a 1d array for me, but not a 2d array. Tried looking up programming guides online, and all the ones I could find are limited to 1d arrays as well.
The best I could come up with was to try and break my array up into a bunch of 1 dimensional arrays, and export each of them individually. However, since my 2d array is something like 300 X 1000 (exact size depends on user input), this isn't a very practical solution, even when put inside a for loop.
I've got all of 4 days programming experience, and don't speak "programmer " at all, so if you could limit your explanation to common english (as hard as I'm sure that is) I would greatly appriciate some help.
*Note, for what I want to do to the data later, I do need to export specifically to Excel. If there's a shortcut for doing that versus exporting to a more general format (like a .txt file or a generic spreadsheet), I'd rather take the shortcut.
Thanks in advance.
I can get the fwrite command to save a 1d array for me, but not a 2d array. Tried looking up programming guides online, and all the ones I could find are limited to 1d arrays as well.
The best I could come up with was to try and break my array up into a bunch of 1 dimensional arrays, and export each of them individually. However, since my 2d array is something like 300 X 1000 (exact size depends on user input), this isn't a very practical solution, even when put inside a for loop.
I've got all of 4 days programming experience, and don't speak "programmer " at all, so if you could limit your explanation to common english (as hard as I'm sure that is) I would greatly appriciate some help.
*Note, for what I want to do to the data later, I do need to export specifically to Excel. If there's a shortcut for doing that versus exporting to a more general format (like a .txt file or a generic spreadsheet), I'd rather take the shortcut.
Thanks in advance.
Comment