Multi-robot file contention/locking

Is there an activity or approach for resolving/dealing with contention for a shared resource by multiple robots, e.g. writing to an Excel file?