|
From: <wa...@wa...> - 2004-12-06 22:18:26
|
On 4 Dec 2004 at 21:39, giampietro.gardenghi wrote: > Hi, > I'm a beginner C++ user, and I'm tring to output an array in excel > format: the only result I have accomplished is to obtain an array > which excel reads as separate rows but not sepate columns. Probably I > should use a TAB sepation between values, which I am not able to > insert. Thank you Giampietro Gardenghi You have several options. You can write out your text file in a delimited format and then when you read the file, tell it you want to read in a delimited file and tell it the delimiter. You can delimit columns on white space (like spaces or tabs) or you can use a predefined character (like '^' or '|' or ','). Someone's already posted how to print out with tabs. OR, you can actually find out what the file format is for .xls files and write out your file in that format. But that's going to be a bit more complicated and I don't know the .xls format. You can probably dig it up with a little research and/or experimentation. Watson (the pencil neck) Davis |