cancel
Showing results for 
Search instead for 
Did you mean: 

Master Agreement to XLS/CLS files

former_member208675
Active Contributor
0 Kudos

Hi,

Is there any way to send data from fields of Master Agreement to xls/cls files?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

YOu can create The CSV file and add it as an attachment to the document. THe user can retrieve the file from the attachments tab.

You can implement this functionality as a toolbar script. When the user clicks on the toolbar script the file will get created and will be added as an attachment to the document.

Steps:

Create a toolbar script that and set the visibility as "EDit only"

within the script Create the CSV file as a byteArrayInputStream.

//code snippet to add an atachment

attachmentObject=doc.getAttachments().create();

attachment=attachmentObject.getAttachment();

attachment.setFileData(fileName.csv,byteArrayInputStream,attachmentObject.getParentObjRef(),session);

attachmentObject.setAttachment(attachment);

attachmentObject.setDescription("description");

//set other mandatory data to the attachmentObject

//add the Attachment object to the document.

doc.getAttachments().add(attachmentObject);

save the Document.

doc.getIBeanHomeIfc().save(doc);

Hope this helps.

Regards,

Immanuel