Collaborating on a file

Collaborating on a file

Hi everyone, can somebody please give me a sample code for collaborationg on office files. 
I haven't understood well the documentation content about this. Thanks.