A kind of Office online file editing method and system being compatible with more browsers
Technical field
The present invention relates to documents editing fields, and in particular to a kind of online file editing side Office for being compatible with more browsers
Method and system.
Background technique
It with informationization technology continues to develop, the application system of B/S framework is also increasingly wider in the application of all trades and professions
General, user only needs to access the related resource of server by browser, and more or less can all meet in office process
To the case where processing office document;The characteristics of due to B/S framework, earlier user can only be by profile downloads to sheet
Ground carries out the operation such as preview, editor, upload again, and use is very inconvenient.Later period Microsoft provides a open source ActiveX control
DSOframer is used for online editing Word, Excel, PowerPoint, but can only be nested under the browser of IE kernel makes
With the browsers such as major browsers Chrome, red fox are not supported at present;Followed by Microsoft stopped pair before 10 years
DSOframer updates, current only support office2007 and version before.
The prior art has the following deficiencies:
1. currently only supporting the version before office2007, office2010, office2013, office2016 are not propped up
It holds;
2. being unable to browser-cross use, only supports IE kernel browser, do not support the browsers such as Chrome, red fox;
3. support manual edit, does not support JavaScript to interact (text, picture, table, book with Office document
Label).
Summary of the invention
In view of the above existing problems in the prior art, the present invention provides a kind of Office documents for being compatible with more browsers to exist
Line edit methods, comprising:
The current Microsoft Office office software of development support can online preview and edit operation plug-in unit;
It completes to use ActiveX plug-in unit in the browser of non-IE kernel, realize under the browser of other non-IE kernels
Manage Office document;
Complete JavaScript and Office the document interactive operation of browser.
As advanced optimizing for above scheme, Microsoft's Office office software include Office2003,
The document of five versions of Office2007, Office2010, Office2013 and Office2016.
As advanced optimizing for above scheme, the realization of ActiveX plug-in unit is used in other browsers of non-IE kernel
Step includes the following:
(1) user disposes installation Microsoft Office office software in local client;
(2) according to the more browser Office online file editings of compatibility, the corresponding browser for developing embeddable IE kernel
KdgcBrower.exe;
(3) user calls the application-browsing device journey of local client deployment installation by custom protocol URL Protocol
Sequence KdgcBrower.exe, and by the URL of editor's Office document to be visited and parameter information to URL Protocol;
(4) it develops and runs Windows Service service KdgcService.exe, whether detection local client pacifies
KdgcBrower.exe is filled, and version number's Scanning Detction is carried out to the mounted KdgcBrower.exe of local server;
(5) by KdgcBrower.exe, newly-increased registry operations, KdgcService.exe uniform packing at
KdgcSetup.exe installation kit;
(6) the KdgcSetup.exe installation kit that step (5) are packaged is uploaded to the catalogue of the web project creation of server
In, and providing web project catalogue can download online service;
(7) it is added in JavaScript and calls KdgcService.exe application program, whether detection active client is installed
Current page is jumped to Web if testing result is too low not install or being currently installed on version by KdgcSetup.exe function
The installation of engineering catalogue download online interface updates;
(8) label is introduced in html or JSP;
(9) pending document is passed through being uploaded to KdgcBrower.exe in the form of parameter
KdgcBrower.exe opens current pending document;
(10) Web application receives the file request that active client uploads, and reads document according to document path is uploaded, and return
Return pending document flow.
As advanced optimizing for above scheme, the exploitation for being embedded in the browser KdgcBrower.exe of IE kernel includes such as
Under:
(21) local engineering is created by 6.0 programming language of Visual Basic in local server, and called
WebBrowser control;
(22) forms are created in the new construction of step (21), and call webBrowser control;
(23) attribute of new construction is set and writes Sub Main () method for Sub Main starting, and formulates and is advised into ginseng
Then 1. | 2., webBrowser access url is 1. represented, form properties are 2. represented;
(24) current engineering is compiled, KdgcBrower.exe is generated.
As advanced optimizing for above scheme, the detection browser version process of KdgcService.exe includes the following:
(31) user carries out installation situation detection to the KdgcBrower.exe application program of active client, if current visitor
The testing result at family end is not install KdgcBrower.exe, and KdgcService.exe application program popup web page prompts user
Downloading installation KdgcBrower.exe;
(32) it if detection active client has installed KdgcBrower.exe, by GetRegedit method, obtains current
The installation version number of the KdgcBrower.exe applications registry of client;
(33) version and server version of the installation of KdgcService.exe application program detection active client are inconsistent
When, KdgcService.exe popup web page prompt user by KdgcBrower.exe application program updating to and server version
Unanimously.
As advanced optimizing for above scheme, the support JavaScript and Office document exchange method includes
It is inserted into text, picture, table and bookmark.
As advanced optimizing for above scheme, the step of supporting JavaScript and Office document exchange method is realized
It is as follows:
(41) the object label of current engineering is obtained by JavaScript language;
(42) the ActiveDocument object of pending office document is obtained by the object label of step (41);
(43) according to text, picture, table and the bookmark in Office VBA programming language editor's document, by common operation
It is packaged into method by JavaScript, all interfaces of current KdgcBrower.exe application program are provided and are used.
The invention also discloses a kind of Office online file editing systems for being compatible with more browsers, comprising:
One or more processors;
Memory, for storing one or more programs, when one or more of programs are by one or more of places
When managing device execution, so that one or more of processors execute a kind of more browsers as claimed in claim 1
Office online file editing method.
The invention also discloses a kind of computer readable storage mediums for being stored with computer program, and the program is by processor
A kind of Office online file editing method of more browsers as claimed in claim 1 is realized when execution.
By adopting the above technical scheme, compared with prior art, a kind of Office of more browsers of the invention is literary by the present invention
Shelves online editing method, has the advantages that
1. a kind of Office online file editing method for being compatible with more browsers of the invention, by developing a insertion IE
The browser of kernel can be opened and be compiled online using the browser is directed toward when Office document by URL Protocol
Collect the Office document of different editions.
2. a kind of Office online file editing method for being compatible with more browsers of the invention is embedded in the browser of IE kernel
It supports JavaScript to interact with Office document, includes inserting by the common operation of Office using Office VBA programming language
Entering the function packages such as text, picture, table and bookmark is unified interface, simplifies the operation of user.
3. a kind of Office online file editing method for being compatible with more browsers of the invention, that develops according to the present invention is embedding
The browser for entering IE kernel realizes the automatic installation and upgrade of software by version detection, and need to only pass through common desktop browsing
Device realizes Office office, is not necessarily to additional studies new content, facilitates the upper hand of user, enhances user experience.
Detailed description of the invention
Fig. 1 is a kind of structural schematic diagram of Office online file editing system for being compatible with more browsers of the invention;
Fig. 2 is a kind of flow diagram of Office online file editing system for being compatible with more browsers of the invention;
Fig. 3 is a kind of client terminal structure figure of Office online file editing system for being compatible with more browsers of the invention;
Fig. 4 is a kind of server architecture figure of Office online file editing system for being compatible with more browsers of the invention;
Fig. 5 is a kind of flow diagram of Office online file editing method for being compatible with more browsers of the invention.
Specific embodiment
In order to make the objectives, technical solutions and advantages of the present invention clearer, right below by attached drawing and embodiment
The present invention is further elaborated.However, it should be understood that specific embodiment described herein is only used to explain this hair
Range that is bright, being not intended to restrict the invention.
Embodiment 1
Referring to Fig. 1-5, this preferred embodiment provides a kind of Office online file editing system for being compatible with more browsers, packet
It includes
Server 200, including the first browser module 210, document memory module 220 and document calling module 230;
As described above, the first browser module 210, for showing Office document;
Document memory module 220, for storing Office document;
Document calling mould, 230, the calling of the Office document for client access server;
Client 100, user is in locally-installed Office office software, and the Office by calling local disposition installation
Online editing distal tool end calls edit and storage in the document of server 200;
Preferably, above-mentioned client 100 includes the second browser module 110, software module 120, installation detection module
130, upgraded module 140 and plug-in unit calling module 150;
Second browser module 110, for showing Office document;
Software module 120 is used to open and operates Office document, and is Microsoft Office office software
Any one of five versions of Office2003, Office2007, Office2010, Office2013 and Office2016, this
Embodiment is preferably Office2016;
Detection module 130, the installation situation of the tool of the Office online editing for detecting active client are installed;
Upgraded module 140, for by the version number of the tool of the Office online editing of active client and server 200
It is unified.
Embodiment 2
The present invention provides a kind of Office online file editing methods for being compatible with more browsers, specifically include following step
It is rapid:
S1, user dispose installation Microsoft Office office software in local client 100;
According to the more browser Office online file editings of compatibility, the corresponding browser for developing embeddable IE kernel
KdgcBrower.exe;
User calls the application-browsing device journey of the deployment installation of local client 100 by custom protocol URL Protocol
Sequence KdgcBrower.exe, and by the URL of editor's Office document to be visited and parameter information to URL Protocol;
S2 develops and runs Windows Service service KdgcService.exe, and whether detection local client 100
KdgcBrower.exe is installed, and version number's Scanning Detction is carried out to the mounted KdgcBrower.exe of local server 200;
S3 by KdgcBrower.exe, newly-increased registry operations, KdgcService.exe uniform packing at
KdgcSetup.exe installation kit;
The KdgcSetup.exe installation kit that step (5) is packaged is uploaded to the mesh of the web project creation of server 200 by S4
In record, and providing web project catalogue can download online service;
S5 is added in JavaScript and is called KdgcService.exe application program, and whether detection active client 100 pacifies
KdgcSetup.exe function is filled, if testing result is too low not install or being currently installed on version, current page is jumped to
The installation of web project catalogue download online interface updates;
S6 introduces label in html or JSP;
S7 passes through by pending document being uploaded to KdgcBrower.exe in the form of parameter
KdgcBrower.exe opens current pending document;Preferably, KdgcOffice: // | http: // 127.0.0.0:
8080/appWeb/editword.do? file=d:/uploadFile/test1.doc | width=1200px;Height=
800px;|1234;
S8, Web application receive the file request that active client 100 uploads, and read document according to document path is uploaded, and
Return to pending document flow.
Preferably, following value is added in registration table:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\KdgcOffice]
@=" KdgcOfficeProtocol "
" URL Protocol "=" C: KdgcSoft officeBrower KdgcBrower.exe "
" Version "=" 1.1.9 "
[HKEY_CLASSES_ROOT\KdgcOffice\DefaultIcon]
@=" C: KdgcSoft officeBrower KdgcBrower.exe, 1 "
[HKEY_CLASSES_ROOT\KdgcOffice\shell]
[HKEY_CLASSES_ROOT\KdgcOffice\shell\open]
[HKEY_CLASSES_ROOT\KdgcOffice\shell\open\command]
@=" " C: KdgcSoft officeBrower KdgcBrower.exe ", " %1 " ".
Preferably, label is introduced in html or JSP, specific code is as follows:
< object classid=" clsid:00460182-9E5E-11D5-B7C8-B8269041DD57 " id="
FramerControl1 " style=" left:0px;top:0px;Width:100%;Height:95% " VIEWASTEXT >
<param name="_ExtentX"VALUE="6350">
<param name="_ExtentY"VALUE="6350">
<param name="BorderColor"VALUE="-2147483632">
<param name="BackColor"VALUE="-2147483643">
<param name="ForeColor"VALUE="-2147483640">
<param name="TitlebarColor"VALUE="-2147483635">
<param name="TitlebarTextColor"VALUE="-2147483634">
<param name="BorderStyle"VALUE="1"></object>.
As advanced optimizing for above scheme, the exploitation for being embedded in the browser KdgcBrower.exe of IE kernel includes such as
Under:
(21) local engineering is created by 6.0 programming language of Visual Basic in local server, and called
WebBrowser control;
(22) forms are created in the new construction of step (21), and call webBrowser control;
(23) attribute of new construction is set and writes Sub Main () method for Sub Main starting, and formulates and is advised into ginseng
Then 1. | 2., webBrowser access url is 1. represented, form properties are 2. represented, such as width, height, From Left away from, top margin
Etc. information;
Preferably,
WebBrowser access is such as set:
Http: // 127.0.0.0:8080/appWeb/editword.do? file=d:/uploadFile/
Test1.doc | width=1200px;Height=800px;Forms width 1200px, height 800px:http are set: //
127.0.0.0:8080/appWeb/editword.do? file=d:/uploadFile/test1.doc;
(24) current engineering is compiled, KdgcBrower.exe is generated.
As advanced optimizing for above scheme, the detection browser version process of KdgcService.exe includes the following:
(31) user carries out installation situation detection to the KdgcBrower.exe application program of active client 100, if working as
The testing result of preceding client 100 is not install KdgcBrower.exe, and KdgcService.exe application program popup web page mentions
Show that user downloads installation KdgcBrower.exe;
(32) if detection active client 100 has installed KdgcBrower.exe, by GetRegedit method, acquisition is worked as
The installation version number of the KdgcBrower.exe applications registry of preceding client 100;
(33) version and 200 version of server that KdgcService.exe application program detection active client 100 is installed
When inconsistent, KdgcService.exe popup web page prompt user by KdgcBrower.exe application program updating to service
200 version of device is consistent.
As advanced optimizing for above scheme, the support JavaScript and Office document exchange method includes
It is inserted into text, picture, table and bookmark.
As advanced optimizing for above scheme, the step of supporting JavaScript and Office document exchange method is realized
It is as follows:
(41) the object label of current engineering is obtained by JavaScript language;
(42) the ActiveDocument object of pending office document is obtained by the object label of step (41);
(43) according to text, picture, table and the bookmark in Office VBA programming language editor's document, by common operation
It is packaged into method by JavaScript, all interfaces of current KdgcBrower.exe application program are provided and are used.
Embodiment 3
A kind of Office online file editing method being compatible with more browsers of the invention, support JavaScript with
Office document is interactive, includes the following:
(41) the object label of current engineering is obtained by JavaScript language;
(42) the ActiveDocument object of pending office document is obtained by the object label of step (41);
(43) according to text, picture, table and the bookmark in Office VBA programming language editor's document, by common operation
It is packaged into method by JavaScript, all interfaces of current KdgcBrower.exe application program are provided and are used.
A kind of Office online file editing method and system being compatible with more browsers proposed by the present invention is taken by building
It is engaged in device end, disposing the first browser module of installation, document storage system and document calling system, customer in response end uploads online
The request of Office document is edited, the document being locally stored, then the second browsing in client are called by the first browser module
Device module is opened;The present invention also constructs client, including the second browser module, software module, installation detection module and liter
Grade module, user complete the version system of client and server online editing tool by installation detection module and upgraded module
One, then open the Office document for being stored in server end online by the document flow that server end returns.One kind of the invention
It is soft to support that the Office of the multiple versions of current Microsoft handles official business for the Office online file editing method and system of compatible more browsers
Part, and since exploitation is integrated with the browser of IE kernel, it is no longer limited by traditional IE browser, enhances audient user, together
When also support JavaScript interacted with Office document, be truly realized any Office document of online editing, enhance user's
Office efficiency, portable people's lives.
In addition, it should be understood that although this specification is described in terms of embodiments, but not each embodiment is only wrapped
Containing an independent technical solution, this description of the specification is merely for the sake of clarity, and those skilled in the art should
It considers the specification as a whole, the technical solutions in the various embodiments may also be suitably combined, forms those skilled in the art
The other embodiments being understood that.