FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Send .csv file to browser
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Send .csv file to browser [message #170017 is a reply to message #170014] Tue, 05 October 2010 16:52 Go to previous messageGo to previous message
Derek Turner is currently offline  Derek Turner
Messages: 48
Registered: October 2010
Karma:
Member
On Tue, 05 Oct 2010 12:05:34 -0400, Jerry Stuckle wrote:

> Right idea, but some problems. First of all, what happens if a field
> contains a comma i.e. "Smith, Jr.".

Never thought of that, it's not something we would even consider in
Britain, nor 2nd or 3rd.


> Text fields also need to be
> surrounded by double quotes, and any double quotes in the text field
> must be doubled to be a valid CSV file.

When TB exports a csv it doesn't quote text fields so presumably it
doesn't need them quoted to import them:

<export>
First Name,Last Name,Display Name,Nickname,Primary Email,Secondary
Email,Screen Name,Work Phone,Home Phone,Fax Number,Pager Number,Mobile
Number,Home Address,Home Address 2,Home City,Home State,Home ZipCode,Home
Country,Work Address,Work Address 2,Work City,Work State,Work ZipCode,Work
Country,Job Title,Department,Organization,Web Page 1,Web Page 2,Birth
Year,Birth Month,Birth Day,Custom 1,Custom 2,Custom 3,Custom 4,Notes,
,,Tim(at)Wynsors(dot)com,,newsletter(at)mail(dot)wynsors(dot)com,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,247Spares,,no-reply(at)247spares(dot)co(dot)uk,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,Novatech,,ewmail(at)novatech(dot)co(dot)uk,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,newsletter(at)maplin(dot)co(dot)uk,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
</export>

> Also, some places use a

Use a what?

>
> Then just output directly with the appropriate headers.

Yes, I like the idea of an output buffer downthread.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: file access permission?
Next Topic: Process queue without cron jobs
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 09:14:08 GMT 2024

Total time taken to generate the page: 0.04131 seconds