On 20/06/06, URBAN LANDREMAN <[EMAIL PROTECTED]> wrote: > I'm trying to write a .csv file which I can subsequently load into Excel. > The part that's tripping me up is I want to include an "Alt-Enter" between > two of the fields so that when Excel reads the file, it will enter the two > fields into the same cell, but on separate lines.
Hi, You could try printing a carriage return: '\r'. But, also --- have you looked into the csv module? It's designed for writing (and reading) csv files, and it knows about Excel. It might be that you can feed it strings with newlines in them and it will produce the output you want. -- John. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor