How to Upload an Excel File to CMS Programmatically Using BO Java SDK

static public void uploadFile(IInfoStore infoStore, String filename, String title, int parentId)
    throws SDKException
{
    IInfoObjects infoObjects = infoStore.newInfoObjectCollection();
    IInfoObject newInfoObject = infoObjects.add(CeKind.EXCEL);
    newInfoObject.setTitle(title);
    newInfoObject.getFiles().addFile(filename);
    newInfoObject.setParentID(parentId);
    infoStore.commit(infoObjects);
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s