Customize Checkin - Update a type with Excel sheet values
Hi,
I am busy customizing the checkin component. When a user edits and checks in the imported spreadsheet, a type needs to be updated with the updated values from the spreadsheet. I have tried using the code below to get the data from the repository:
try {
IDfSysObject sysObj = (IDfSysObject)getDfSession().getObject(new DfId("0900303980006ccd"));
ByteArrayInputStream bais = sysObj.getContent();
if (bais.available() > 0)
{
System.out.println("// Data successfully fetched from the server...");
}
//added code
byte[] b = new byte[1];
bais.read(b,0,1);
int number;
int linelength = 0;
int item=0;
do{
number = bais.read();
System.out.print(Character.toUpperCase((char)number));
linelength++;
if(linelength==25){
System.out.println();
}
item++;
}while(item < 100000);
for (int countery = 0; countery < b.length; countery++) {
System.out.println(b[countery]);
}
} catch (DfException ex) {
Logger.getLogger(CommitmentRegisterCheckin.class.getName()).log(Level.SEVERE, null, ex);
}
I got the code from the internet. I tried testing the code by printing some characters to the log (i.e the added code). There are rectangles and symbols printed in the logs and the characters are not in the spreadsheet. Is the code correct? How can I capture the updated information and update the type with that updated information?
Thanks. Kenrick.
Comments
-
Kenrick,
Please consider moving this question as-is (no need to recreate) to the proper forum for maximum visibility. Questions written to the users' own "Discussions" space don't get the same amount of attention and questions can go unanswered for a long time.
You can do so by selecting "Move" under ACTIONS along the upper-right. Then search for and select: "Documentum" (Developer Network) which would be the most relevant for this question.
0 -
Use getFile() instead of getContent()
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 152 General Questions
- 148 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 9 XM Fax
- Follow Categories