How to update attributes of some documents with values from an Excel file?

edited September 16, 2010 in Documentum #1

We need to update couple of attributes for hundreds of documents stored in Documentum. We cannot manually update one by one. Therefore, we would like to update the attributes of documents through a script / query, which should read the attributes value from Excel file and accordingly update the attributes of documents.

Please let me know, How to read values from an Excel file and Update couple of custom attributes for multiple documents within Documentum?

Thanks in advance.




  • prabhu
    edited September 15, 2010 #2

    Write a stand alone java code to read the excel sheet using POI and update the objects in repository with attribute values using DFC. Shouldn't take much time when compared to manual activity.

  • pankaj.pandey
    edited September 16, 2010 #3

    Search for Apache POI. Get the jars from apache website. Than google or check for samples on the website itself for how to read excel using POI. You can find most of the code online. Than just customize it as per your need and write dfc code for updating it. That's it. once you have a template ready, it could be of great help to you in future as well.

    Hope that helps!!

  • mszurap
    edited September 16, 2010 #4

    In such cases I write an excel formula:

    =CONCATENATE("UPDATE dm_document object set title='";$B2;"', set subject='";$C2;"' where r_object_id='";$A2;"'")

    Of course you need the r_object_ids for each row (in this case column A is r_object_id, B is the title and C is subject to set), to know which document to update with those values...

    You only need to add a "go" statement between each row (copy paste into a text editor, search-and-replace "\n" with "\ngo\n") and save this file, then run it with idql:

    $DM_HOME/bin/idql reponame -Uuser -Ppassword -Ryour_input_file.dql


  • Can we use REST API to update objects and their metadata? Could you please share syntax for that? Thanks.