Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing into excel 1

Status
Not open for further replies.

wiser3

Programmer
Jun 3, 2003
358
CA
I'm a webmaster and i created a form that emails it's data to us and saves a record of it on the server. This record is a tab delimited file that we'd like to import into excel to see who was ordering what, how often ect...

The last item of the form is a textarea for "comments". People often hit enter to seperate their comments into paragraphs and that's where i run into a problem. I want excel to keep the comment together in the same cell. But when we import the tab delimited file into excel, excel starts a new row with every enter, thereby spliting up the comment. To solve this i programmed the form handler to enclose the comments in double quotes. But excell still splits up the comments across rows when we import the file.

How do i get excell to keep the comments in the same cell? I've tried setting that column of cells to "text wrap" before importing, but that didn't help.
 
I had better luck with comma delimited file. Is this a possibility for you?
 
On second look this didn't work so well. What about replacing returns with a symbol and then replacing them back in excel. If you do it in macro in excel you would replace whatever symbol you use with chr(10).
 
I got it to work with comma-delimited. First line of csv is header line for field names and any fields that may contain line breaks would need to be enclosed in double quotes.
E.g., Field 1, Field 2, "Comments
 
I changed the program to make a comma delimited file with fields enclosed in double quotes and it works perfectly.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top