Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 17th, 2008, 03:58 PM
Authorized User
Join Date: Jun 2005
Location: , , .
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default save .csv with newline character

i'm creating a .csv file on the fly, thus am enclosing all the data within double quotes.
how to put in a newline character is the problem. for eg:-
i tried the following -

"header1","header2","header3"\n"data1","data2","da ta3"\n"data11","data22","data33"


"header1","header2","header3 \n"\r\n "data1","data2","data3 \n"\r\n "data11","data22","data33"

so that the output looks like

header1 header2 header3
data1 data2 data3
data11 data22 data33

thanks a lot for your help

Old November 19th, 2008, 03:50 AM
Friend of Wrox
Points: 2,101, Level: 18
Points: 2,101, Level: 18 Points: 2,101, Level: 18 Points: 2,101, Level: 18
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jul 2003
Location: , , .
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts

Is there any code you have written for this? Please post.

I'm not sure what the end use of the .csv file would be. What's the purpose of creating this file?

You might want to try ASCII newline character. Don't really have much experience with creating .csv files.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Read CSV file - Save Columns into Rows pintoo BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 1 August 20th, 2008 09:01 AM
save as CSV file cdsniti Java Databases 1 December 21st, 2005 07:26 AM
Problem with Newline character d_sathish XSLT 3 November 25th, 2005 07:20 PM
Newline character problem gsudipta1 XML 0 March 16th, 2005 03:54 AM
save file in csv, txt format in jsp URGENT ernidhi2003 JSP Basics 1 October 14th, 2004 04:59 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.