Develop an office Online Editor System
4.1 OfficeOnline Editor System Principle
DsoframeIs an OCX control based on the client. Its function is to embed office documents into a browser and call various interfaces in office to edit documents, then, use the HTTP interface of the control to simulate form submission and send it to the data processing page to complete archiving of documents.
4.2 webofficeSystem development process
4.2.1.Load controls
<Object> </Object>
4.2.2Register controls
1.FirstDsoframer. ocxControl copyC: \ windows \ system32Directory
2.Then start->Run-> Regsvr32 dsoframer. ocx,The system will promptDsoframer. ocxInDllregisterserverSuccessful
4.2.3 Create online document
1.NewWoreFile
Function void createword ()
2.NewExcelFile
Function createexcel ()
3.NewPointpowerFile
Function createpowerpoint ()
4.2.4Open the online document and edit it.
Function openfile (URL) {oject. Open (URL, true );}
4.2.5Run the HTTP upload interface to save the form elements and office documents.
FunctionSaveFile (oject ){
1.Initialize storage engine
Oject. httpinit ();
2.Add post variable
Oject. httpaddpoststring (PATH)
3.Upload open files
Oject. httpaddpostcurrfile (filedata );
4.Upload
Oject. httppost (URL );}
For more information, see the effect below: