Thursday, 10 March 2011

Export Field Revisions to Excel

At home today, due to being snowed in.  I like working from home as it keeps all the banter, telephone calls and meetings to a minimum and when I am coding I like peace and quiet.  I know the developers I work with listen to music, but I don't really like doing that. 

Today I wrote a nice piece of script to export document history to Excel.  The document contains around 14 fields that are stamped when a history snap shot is taken.  These could be dates, text, names and number (no rich text).  The history will be rarely viewed, but when they want to see it, they want to analyse it in Excel.... as always !  
So, I created a piece of script based on the ACL export script I have previously mentioned and added in a small function (found on the web) for an @explode in LotusScript.  This can be found in my Useful Code section now (thank you to the author).

The history is kept in a multi-value field per snapshot and the details are separated with a tilde "field~field~field".  My code then gets each item in the history field and splits each field value into a cell on one row, then gets the next value.

Take a look in the Useful Code section for the code.

No comments:

Post a Comment