Save big volume of computation results


I run some computations which give a big number of vectors (let's say 100 vectors, each one contain 2000 elements of type double). I want to save those data and import them into Excel.

I know I can save the results through in txt file. But it would be a very long file. Can I save the results in other more efficient file form that can be imported into Excel? and how?

Thanks in advance.
First of all, you need to ask yourself why you're using C++ for database processing.
Actually I use it to run simulation, which creates a database.
Ah. I don't really think there's another good format to use that would be more compressed than plain text. For importing to excel the file extension should be CSV. It is going to be large either way; both your program and excel have to store them in memory.

How large is the file in pain-text form? Several GB? My only recommendation would be to use a solid state drive if possible.
Why not print them out to a file with a .csv suffix?

I did this before, just printing the data, which is comma separated, into a file.

File is just like a normal text file but the name is like "file.csv". Excel opens csv files and uses the comma as a delimiter (or tabs, whatever you choose when you open the file actually).
Last edited on
Is that not what I just said?
Last edited on
My comment wasn't directed to you.

We are saying the same thing, which means we agree.
Thanks yelnatz and L B. The file will be long, but not very big (below 100M). With .csv it will make it.

Thanks again! :)
Topic archived. No new replies allowed.