I have documentum job that does some processing, I want to generate a csv file (excel) from the job and also write some content textusing DFC in some of the users folder/s
I can generate Text file with following code, But I am not sure how to generate a csv excel file and modify/ add the content in the file
IDfFolder folder = session.getFolderByPath(filePath);
IDfDocument newDoc = (IDfDocument)session.newObject("dm_document");
newDoc.setObjectName(logFileName);
ByteArrayOutputStream bas = new ByteArrayOutputStream();
byte b[] = ("Hello this is my test text"+"\r\n").getBytes();
bas.write(b);
//Associate the content with the document
newDoc.setContentEx2(bas, "crtext", 0, false);
//Link
if(folder != null){
newDoc.link(folder.getObjectId().toString());
}
//Save it
newDoc.save();
sample code will help, I am new to documentum.