Yes there is.

Have you managed to pull the data you want out using the Remedy Java API??
If so, All you do is use the standard Java API for FileWriter. See below:

Please note i havent compiled this and have written it from the top of my
head.

public static void main(String[] args) {

// Pull your data out using the Remedy Java API

    String csvLine = "";
    File csvFile = new File("c:\temp\file.csv");

    csvLine = <data1> +","+ <data2> +","+<etc..>

    // strip out any carriage returns and line feeds
    csvLine = csvLine.replaceALL(\\n,"" );
    csvLine = csvLine.replaceALL(\\r,"" );

    // write to file
    write2File(csvFile, csvLine)

}

private static void write2File(File file, String text) {
try {
        FileWriter fw = new FileWriter(file, true);
        fw.flush();
        fw.write(text);
        fw.close();
    } catch (IOException fe) {
    System.out.println("Error writing to file");
    fe.printStackTrace();
    }
}


Regards

Vik
  -----Original Message-----
  From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] Behalf Of Chintan Shah
  Sent: 04 February 2008 21:01
  To: [email protected]
  Subject: Is it possible to dump data into a CSV file through Java API


  ** Hello all,

  I am trying to dump data returned on search into a CSV file.

  Is there a way to do it through Java API?

  Thanks
  Chintan.



----------------------------------------------------------------------------
--
  Never miss a thing. Make Yahoo your homepage. __Platinum Sponsor:
www.rmsportal.com ARSlist: "Where the Answers Are" html___

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

Reply via email to