CN106844316B - Method and system for processing office document on browser online - Google Patents

Method and system for processing office document on browser online Download PDF

Info

Publication number
CN106844316B
CN106844316B CN201611145288.7A CN201611145288A CN106844316B CN 106844316 B CN106844316 B CN 106844316B CN 201611145288 A CN201611145288 A CN 201611145288A CN 106844316 B CN106844316 B CN 106844316B
Authority
CN
China
Prior art keywords
document
original document
office
file
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611145288.7A
Other languages
Chinese (zh)
Other versions
CN106844316A (en
Inventor
周敏
李卫华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Shipbuilding It Corp ltd
Original Assignee
China Shipbuilding It Corp ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Shipbuilding It Corp ltd filed Critical China Shipbuilding It Corp ltd
Priority to CN201611145288.7A priority Critical patent/CN106844316B/en
Publication of CN106844316A publication Critical patent/CN106844316A/en
Application granted granted Critical
Publication of CN106844316B publication Critical patent/CN106844316B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a system for processing an office document on a browser on line, and relates to the technical field of document editing processing. The system comprises a client and a server, wherein the client replaces an html standard textarea control by js and opens a designated Office document of the server in the html standard textarea control for online editing operation of a user. And after clicking a saving button of the page, the user triggers a callback function of js, and transmits the edited content back to the server and updates the original file. Therefore, the OA software needing document processing is assisted, online editing of the document is realized, a user does not need to download the document and then edit the document, and the processing efficiency of the document is improved.

Description

Method and system for processing office document on browser online
Technical Field
The invention relates to the technical field of document editing processing, in particular to a method and a system for processing an office document on a browser on line.
Background
In the prior art, for example, WebEdit can only be operated in a control, and cannot directly edit an Office file. Meanwhile, no complete set of on-line office document editing technology exists at present, and remote editing and storage of the office document in the server cannot be realized in the browser.
Disclosure of Invention
An object of the present invention is to provide a method and system for processing an office document online on a browser, thereby solving the aforementioned problems in the prior art.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a method of processing an office document online on a browser, comprising the steps of:
s1, calling js script in html by the client;
s2, the client replaces the html standard textarea control with js script control by js script;
s3, the client opens the original document of the appointed server side in the js script control;
s4, the user edits the original document according to the operation mode of office to obtain an edited document;
s5, the user triggers js callback function of the client after clicking the save button of the page, the edited document is transmitted back to the server,
and S6, after receiving the edited document, the server end updates the original document.
Preferably, S2 includes the steps of:
s201, creating a textarea control and configuring a unique ID;
s202, replacing the textarea control represented by the ID in js in a manner of creating the control.
Preferably, S3 includes the steps of:
s301, compiling js statement to set a server address;
s302, according to the position of the original document of the server end appointed by the user, carrying out stream processing on the original document, sending the file stream to the client end where the user is located, restoring the stream file, calling an Office component local to the client end to display in a js script control, and facilitating the user to edit and process the original document according to the Office operation mode.
Preferably, S5 is specifically: and after the user clicks the save button, the content of the page of the client is converted into a stream processing file and is transmitted to the server.
Preferably, S6 is specifically: and at the server side, converting the file into an office file and storing the office file into a folder where the original document is located at the server side, and renaming the original document to ensure that repeated files cannot occur and the edited document is stored.
A system for processing an office document online on a browser, comprising:
the server side is used for providing an original document, receiving the edited document and updating the original document;
the client is used for calling a js script in html, replacing a html standard textarea control with the js script control by using the js script, opening an original document of a specified server in the js script control, editing the original document according to an office operation mode by a user to obtain an edited document, and triggering a js callback function after the user clicks a storage button of a page to transmit the edited document back to the server.
Preferably, the server is configured to convert a file into an office file, store the office file into a folder where the original document is located, and rename the original document.
Preferably, the client is configured to convert the content of the page into a stream processing file after the user clicks the save button, and transmit the stream processing file to the server.
Preferably, the server is configured to perform stream processing on the original document according to a position where the original document specified by the user is located, and send the file stream to a client where the user is located;
the client is used for writing js statements and setting the address of the server, and is also used for restoring the stream file, calling the local Office component of the client to display in the js script control, so that the user can edit and process the original document according to the operation mode of Office.
The invention has the beneficial effects that: the method and the system for processing the Office document on the browser on line comprise a client and a server, wherein the client replaces an html standard textarea control by js and opens a designated server Office document in the html standard textarea control for a user to edit and operate on line. And after clicking a saving button of the page, the user triggers a callback function of js, and transmits the edited content back to the server and updates the original file. Therefore, the OA software needing document processing is assisted, online editing of the document is realized, a user does not need to download the document and then edit the document, and the processing efficiency of the document is improved.
Drawings
Fig. 1 is a schematic structural diagram of a method, a process and a system for processing an office document online on a browser according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention.
Example one
As shown in fig. 1, an embodiment of the present invention provides a method for processing an office document online on a browser, including the following steps:
s1, calling js script in html by the client;
s2, the client replaces the html standard textarea control with js script control by js script;
the method specifically comprises the following steps:
s201, creating a textarea control and configuring a unique ID;
s202, replacing the textarea control represented by the ID in js in a manner of creating the control.
S3, the client opens the original document of the appointed server side in the js script control;
the method specifically comprises the following steps:
s301, compiling js statement to set a server address;
s302, according to the position of the original document of the server end appointed by the user, carrying out stream processing on the original document, sending the file stream to the client end where the user is located, restoring the stream file, calling an Office component local to the client end to display in a js script control, and facilitating the user to edit and process the original document according to the Office operation mode.
S4, the user edits the original document according to the operation mode of office to obtain an edited document;
s5, after clicking a save button of a page, a user triggers a js callback function of the client, and the edited document is transmitted back to the server;
the method specifically comprises the following steps: and after the user clicks the save button, the content of the page of the client is converted into a stream processing file and is transmitted to the server.
And S6, after receiving the edited document, the server end updates the original document.
The method specifically comprises the following steps: and at the server side, converting the file into an office file and storing the office file into a folder where the original document is located at the server side, and renaming the original document to ensure that repeated files cannot occur and the edited document is stored.
Example two
The embodiment of the invention provides a system for processing an office document on line on a browser, which comprises the following steps:
the server side is used for providing an original document, receiving the edited document and updating the original document; the server side is a basic class library and can be called by a third-party system;
specifically, the server is configured to perform stream processing on an original document according to a position of the original document specified by a user, and send the file stream to a client where the user is located; and the method is also used for converting the file into an office file, saving the office file into a folder where the original document is located, and renaming the original document.
The client side is a js script and is used for calling the js script in html, replacing a html standard textarea control with the js script control by using the js script, opening an original document of a specified server side in the js script control, editing the original document by a user according to an office operation mode to obtain an edited document, triggering a js callback function after the user clicks a storage button of a page, and transmitting the edited document back to the server side.
Specifically, the user side is used for writing js statements to set a server side address, and is also used for restoring a stream file, calling a local Office component of the client side to display in a js script control, so that a user can edit and process the original document according to an Office operation mode, and after clicking a save button, converting the content of a page into a stream processing file and transmitting the stream processing file to the server side.
The working process of the system provided by the embodiment of the present invention may refer to the scheme provided in the first embodiment, and is not described herein again.
By adopting the technical scheme disclosed by the invention, the following beneficial effects are obtained: the method and the system for processing the Office document on the browser on line comprise a client and a server, wherein the client replaces an html standard textarea control by js and opens a designated server Office document in the html standard textarea control for a user to edit and operate on line. And after clicking a saving button of the page, the user triggers a callback function of js, and transmits the edited content back to the server and updates the original file. Therefore, the OA software needing document processing is assisted, online editing of the document is realized, a user does not need to download the document and then edit the document, and the processing efficiency of the document is improved.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
It should be understood by those skilled in the art that the timing sequence of the method steps provided in the above embodiments may be adaptively adjusted according to actual situations, or may be concurrently performed according to actual situations.
All or part of the steps in the methods according to the above embodiments may be implemented by a program instructing related hardware, where the program may be stored in a storage medium readable by a computer device and used to execute all or part of the steps in the methods according to the above embodiments. The computer device, for example: personal computer, server, network equipment, intelligent mobile terminal, intelligent home equipment, wearable intelligent equipment, vehicle-mounted intelligent equipment and the like; the storage medium, for example: RAM, ROM, magnetic disk, magnetic tape, optical disk, flash memory, U disk, removable hard disk, memory card, memory stick, network server storage, network cloud storage, etc.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and improvements can be made without departing from the principle of the present invention, and such modifications and improvements should also be considered within the scope of the present invention.

Claims (2)

1. A method for processing an office document online on a browser, comprising the steps of:
s1, calling js script in html by the client;
s2, the client replaces the html standard textarea control with js script control by js script;
s3, the client opens the original document of the appointed server side in the js script control;
s4, the user edits the original document according to the operation mode of office to obtain an edited document;
s5, the user triggers js callback function of the client after clicking the save button of the page, the edited document is transmitted back to the server,
s6, after receiving the edited document, the server end updates the original document;
s2 includes the steps of:
s201, creating a textarea control and configuring a unique ID;
s202, replacing the textarea control represented by the ID in js in a control creating mode;
s3 includes the steps of:
s301, compiling js statement to set a server address;
s302, according to the position of the original document of the server end, which is specified by a user, performing stream processing on the original document, transmitting a file stream to a client end where the user is located, restoring the stream file, and calling an Office component local to the client end to display in a js script control so that the user can edit and process the original document according to an Office operation mode;
s5 specifically includes: after a user clicks a save button, the content of the page of the client is converted into a stream processing file and is transmitted to a server;
s6 specifically includes: and at the server side, converting the file into an office file and storing the office file into a folder where the original document is located at the server side, and renaming the original document to ensure that repeated files cannot occur and the edited document is stored.
2. A system for processing an office document online on a browser, comprising:
the server side is used for providing an original document, receiving the edited document and updating the original document; converting the file into an office file, storing the office file into a folder where the original document is located, and renaming the original document; according to the position of an original document specified by a user, carrying out stream processing on the original document, and sending the file stream to a client where the user is located;
the client is used for calling a js script in html, replacing a html standard textarea control with the js script control by using the js script, opening an original document of a specified server in the js script control, editing the original document according to an office operation mode by a user to obtain an edited document, and triggering a js callback function after the user clicks a storage button of a page to transmit the edited document back to the server;
after a user clicks a save button, converting the content of the page into a stream processing file and transmitting the stream processing file to the server side; and writing a js statement to set a server address, and also used for restoring the stream file, calling an Office component local to the client to display in the js script control so that a user can edit and process the original document according to an Office operation mode.
CN201611145288.7A 2016-12-13 2016-12-13 Method and system for processing office document on browser online Active CN106844316B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611145288.7A CN106844316B (en) 2016-12-13 2016-12-13 Method and system for processing office document on browser online

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611145288.7A CN106844316B (en) 2016-12-13 2016-12-13 Method and system for processing office document on browser online

Publications (2)

Publication Number Publication Date
CN106844316A CN106844316A (en) 2017-06-13
CN106844316B true CN106844316B (en) 2020-08-04

Family

ID=59140245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611145288.7A Active CN106844316B (en) 2016-12-13 2016-12-13 Method and system for processing office document on browser online

Country Status (1)

Country Link
CN (1) CN106844316B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108287920A (en) * 2018-02-13 2018-07-17 深圳市博安达信息技术股份有限公司 A method of handling office files under BS systems
CN110674619B (en) * 2019-09-18 2023-10-17 北京达佳互联信息技术有限公司 Online document editing method, device, equipment and computer storage medium
CN111708956A (en) * 2020-06-15 2020-09-25 江西金格科技股份有限公司 Method for editing Office file in web browser based on HTML5 technology
CN112016280B (en) * 2020-10-16 2021-11-23 北京联想协同科技有限公司 File editing method and device and computer readable medium
CN112395522A (en) * 2020-11-13 2021-02-23 厦门市美亚柏科信息股份有限公司 Method for editing and previewing Office document online, terminal device and storage medium
CN113256259B (en) * 2021-06-01 2024-04-19 通号智慧城市研究设计院有限公司 Online editing service system and implementation method thereof
CN113468858B (en) * 2021-07-21 2023-12-19 山谷网安科技股份有限公司 Method for online editing of office file independent of client environment
CN114237737A (en) * 2021-11-25 2022-03-25 北京轩宇信息技术有限公司 Processing method for structured entry of Word file data

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101567065B (en) * 2009-05-26 2012-11-28 杭州世导科技有限公司 Cross-platform online file editing system and method thereof
CN103942202B (en) * 2013-01-18 2018-01-30 腾讯科技(深圳)有限公司 Web page text domain height adaptive Zoom method and device
CN103955366B (en) * 2014-04-18 2017-04-19 南威软件股份有限公司 Producing method of visualized website template
CN104504160B (en) * 2015-01-20 2018-06-15 中国地质大学(武汉) The online batch wiring method of Excel document based on SSH frames

Also Published As

Publication number Publication date
CN106844316A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
CN106844316B (en) Method and system for processing office document on browser online
CN107832045B (en) Method and apparatus for cross programming language interface conversion
CN108961033B (en) Multi-service system interaction method and device, storage medium and electronic terminal
CN105871690B (en) Method and device for realizing instant messaging
CN112286513A (en) Visual design method and device based on component metadata
US20220342518A1 (en) Card-based information management method and system
CA3061623C (en) File sending in instant messaging applications
JP2020522043A5 (en)
CN102098330A (en) Method, device and system for asynchronous transmission based on json data format
CN103905495A (en) Application synchronization method and backstage server
CN101957756A (en) System and method for rapidly generating intelligent mobile terminal program
CN105701153B (en) Method and device for reading webpage resources and electronic equipment
CN104598570A (en) Resource fetching method and device
CN104216787A (en) Method, device and system for synchronizing clipboards between terminal equipment
CN103595742A (en) A method and an apparatus for debugging webpage CSS
CN105550179A (en) Webpage collection method and browser plug-in
CN104978207A (en) Method for uploading file, browser and system
CN103645968A (en) Browser status restoration method and device
US20120117258A1 (en) Techniques to deploy and undeploy content to and from web servers
CN102137166A (en) Webpage-based webpage synchronously browsing method and system
CN108628702B (en) Memorandum method and device for chat records, electronic equipment and storage medium
CN104601811A (en) Contact information processing method
CN102314467A (en) Method for realizing synchronous browsing of web pages
CN111001157B (en) Method and device for generating reference information, storage medium and electronic device
CN111949184B (en) Method and device for creating document

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant