How to share workbook

Topics: Developer Forum, Project Management Forum, User Forum
Oct 13, 2008 at 11:23 AM
I have an excel file and I want to share it so that differents users can write in it at the same time.
The expected behaviour would be like: I have an excel file opened and I go to the main menu to Tools->Share Workbook and in the opened window I select "Allow changes by more than one user at the same time. This also allows workbook merging".
Is there a property to be set for Excel2007 document in order to make it shareable?

Thank you.
Oct 14, 2008 at 6:14 AM
I'm fairly sure that there is no such option in PHPExcel. Don't know what you're up to, but would it be possible to enable sharing manually after creation?
Oct 14, 2008 at 8:01 AM
I want more than 1 user to write in the excel at the same time. Also if the excel file is open, written should be allowed. These actions can take place only if the workbook is shared!
Even after creating the excel file, if I open it and manually share it, after the 1st save of the data from the web form, the Share is lost. So each time a user writes something in the excel file via web form, "Shared" state is not kept. And I really can't stay all day on the excel file to enable the sharing manually!
Do you know a "workaround" for this?

If the file is opened and I try to write in it I receive the following error (and it seems normal to me since the file is not shared anymore):

Warning: fopen(feedback_13-10-2008.xls) [function.fopen]: failed to open stream: Invalid argument in C:\Win16App\wamp\www\PHPExcel\Classes\PHPExcel\Shared\OLE\OLE_Root.php on line 101

Fatal error: Uncaught exception 'Exception' with message 'Can't open feedback_13-10-2008.xls. It may be in use or protected.' in C:\Win16App\wamp\www\PHPExcel\Classes\PHPExcel\Shared\OLE\OLE_Root.php:103 Stack trace: #0 C:\Win16App\wamp\www\PHPExcel\Classes\PHPExcel\Writer\Excel5\Workbook.php(598): PHPExcel_Shared_OLE_PPS_Root->save('feedback_13-10-...') #1 C:\Win16App\wamp\www\PHPExcel\Classes\PHPExcel\Writer\Excel5\Workbook.php(551): PHPExcel_Writer_Excel5_Workbook->_storeOLEFile() #2 C:\Win16App\wamp\www\PHPExcel\Classes\PHPExcel\Writer\Excel5\Workbook.php(225): PHPExcel_Writer_Excel5_Workbook->_storeWorkbook() #3 C:\Win16App\wamp\www\PHPExcel\Classes\PHPExcel\Writer\Excel5.php(367): PHPExcel_Writer_Excel5_Workbook->close() #4 C:\Win16App\wamp\www\feedback\process.php(80): PHPExcel_Writer_Excel5->save('feedback_13-10-...') #5 {main} thrown in C:\Win16App\wamp\www\PHPExcel\Classes\PHPExcel\Shared\OLE\OLE_Root.php on line 103

Any idea how to solve this?
Thank you.
Oct 14, 2008 at 4:17 PM
Ok, I now see what you mean. You want to modify the workbook from script at a regular basis while not destroying the workbook sharing. Must say that I have no idea what it takes to implement this.

I have posted your question in the tracker so the developers will be aware of your feature request. Discussion may continue there: