csv files

i have a problem with exporting data from my program to csv file to be opened by excel spreadsheet as following:i wantto writh a number in a cell then another value in the next cell in the same row
when i write
file<<"student:"<<55;
the cell in the spreadsheet contains both of them as student55

i tried using comma separator but the same problem
file << "student:," << 55;
it doesn't work either i tried every thing using commas but the same answer
student and the number are in the same cell
is there any possible idea for this problem
You're probably not importing it as a csv file but a tsv or similar file.
no
it is a csv file and i tried using commas and each time i opened the excel file i am importing to the same problem appears
it is a csv file

That wasn't the question.
It matters what you're importing it as.
The default is probably tsv, so use \t instead of commas.
Why two threads on the same topic?

What does the file look like when you open it as plain text in say, notepad?
Last edited on
Just done an experiment: Having a single line in a plain text file with ".csv" as the type specifier, opening by right click, open with excel 2007 will (as one would expect) use commas as delimeters.

So perhaps there's something missing from your interaction with the file?
finally i did it
thank you for your attention and for your appreciable advices
Topic archived. No new replies allowed.