I used this given to me by Robert Shubert from tonics as always he has a good answer.

<@ROWS array=request$drug_data><@COLS><@DQ><@COL><@DQ>,</@COLS><@CRLF></@ROWS> just put it in the write action and it comes out fine. Only thin you need to do is make sure there are no returns in the data.

 


From: Quicknote [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 05, 2005 2:51 PM
To: [email protected]
Subject: RE: Witango-Talk: help with export write csv

 

Hi Dan

Formatting to csv.

So do you want a comma delimitated, text file that can be opened in Excel?

Not an excel file?

So far I have had no problem with exporting in the excel format, but exporting to a comma delimitated text file won't format the "end row"

Your <@CRLF> did not work either.

<@VAR a_lineitems[*,*] SCOPE='Local' APREFIX='start' ASUFFIX='end' RPREFIX='[EMAIL PROTECTED]' RSUFFIX='|' CPREFIX=' ' CSUFFIX=','>

 

You might be losing your mind.

Thanks Janet

 

-----Original Message-----
From: Quicknote [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 05, 2005 1:20 PM
To: [email protected]
Subject: RE: Witango-Talk: help with export write csv

Hi Dan

Did the witango file action not work?

It worked for me.

Thanks for the suggestion about <@crlf>

Janet

-----Original Message-----
From: Dan Stein [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 05, 2005 11:54 AM
To: [email protected]
Subject: RE: Witango-Talk: help with export write csv

It is not the writing of the file and getting it is is the formatting of the csv that is the issue

 


From: Christian Platt [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 05, 2005 11:32 AM
To: [email protected]
Subject: Re: Witango-Talk: help with export write csv

 

Normally, i do a search action , assign the result to a request variable, do a <@purgeresults> and save my variable with the result to a file.

which is normaly <@WEBROOT><@APPFILEPATH>temp/sonstwas.csv

 

the temp folder has to be of witango, otherwise you cannot write into it (on OSX)

 

Christian

 

Am 05.11.2005 um 14:11 schrieb Dan Stein:

 

I need to do a search on a SQL table and bring back and array with column headers and then write it to a .csv file so it can be opened with Excel

This is what I am doing with the search result

<@Assign request$applications @@resultset >

<@ADDROWS ARRAY="request$applications" VALUE="@@resultset[0,*]"POSITION="0">

Then I am just doing a file write of

@@request$applications

Tgo

<@APPFILEPATH>Data/applications.csv

Thew file comes in an email but it is an array with all the HTML code.

I might be losing my mind but this worked when I first built it and tested it but now it is not working

Any help is appreciated.

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

 

 

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to