CN101145148A - Processing method and apparatus for electronic table file - Google Patents

Processing method and apparatus for electronic table file Download PDF

Info

Publication number
CN101145148A
CN101145148A CNA2007101660390A CN200710166039A CN101145148A CN 101145148 A CN101145148 A CN 101145148A CN A2007101660390 A CNA2007101660390 A CN A2007101660390A CN 200710166039 A CN200710166039 A CN 200710166039A CN 101145148 A CN101145148 A CN 101145148A
Authority
CN
China
Prior art keywords
array
sheet
book
loaded
electronic form
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.)
Granted
Application number
CNA2007101660390A
Other languages
Chinese (zh)
Other versions
CN100511212C (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.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China Co 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CNB2007101660390A priority Critical patent/CN100511212C/en
Publication of CN101145148A publication Critical patent/CN101145148A/en
Application granted granted Critical
Publication of CN100511212C publication Critical patent/CN100511212C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention discloses a processing method of spreadsheet files, including that the array elements of spreadsheet files are read in. The Book arrays are loaded as Book objects. Corresponding Sheet arrays are selected, operated and confirmed according to the worksheets of users, and the Sheet arrays are loaded as Sheet objects. The Book objects of the spreadsheet files that need to be preserved, the loaded Sheet objects and the unloaded Sheet arrays are acquired. The Book objects are converted to Book arrays. The loaded Sheet objects are converted to Sheet arrays, and the arrays are combined and preserved. When the present invention reads a workbook, the byte arrays of all Sheet objects of the Book objects are not needed to be converted to the Sheet objects, and the Sheet arrays that are corresponding to the workbook visited by users are only needed to be converted to the Sheet objects dynamically. When the present invention preserves a workbook, the Sheet objects that are read by users and the loaded Sheet objects are only needed to be converted to byte arrays, and the unloaded Sheet objects are not needed to be regenerated, thereby reducing the occupation of memory resources efficiently and enhancing the processing efficiency.

Description

The disposal route of electronic form file and treating apparatus
Technical field
The present invention relates to the application program process field, particularly the save set of the store method of the reading device of a kind of read method of electronic form file, a kind of electronic form file, a kind of electronic form file, a kind of electronic form file.A kind of disposal route of electronic form file and a kind for the treatment of apparatus of electronic form file.
Background technology
Along with development of computer, electrical form (Spreadsheet) has become the important tool that people carry out data processing with its powerful form processing power, existing electronic form file (as the Excel book), generally include a plurality of worksheets, each worksheet comprises a plurality of row and columns.In the prior art, when the read operation according to the user loads this electronic form file, need read all working table of electronic form file, and be loaded as memory object; Correspondingly, when preserving operation, also need all working table object that loads is preserved.
Particularly, a usually corresponding Book (file) object of electronic form file, a Book object generally includes a plurality of Sheet (table page or leaf) object, in the prior art, when reading a Book object, need Sheet objects all in this Book object be loaded, for example, comprise 100 worksheets in certain book, when adopting prior art to read this book, can all be loaded in the internal memory 100 worksheet objects in this book, yet in practice, the user is some to wherein just often, certain several or part worksheet conducts interviews and operates, the then this behavior significant excess committed memory resource that all reads, thus the problem that treatment effeciency is low caused.Correspondingly, when adopting this prior art to carry out the electronic form file preservation, the Sheet objects that still need all to load before convert corresponding byte array to, and then preserve these arrays.In this case, even the user only operates at certain Sheet object,, still need to convert to corresponding byte array to store for other Sheet object of not operating, thereby caused the waste of resource more, had a strong impact on the treatment effeciency of electronic form file.
So those skilled in the art press for develops a kind of reducing under the prerequisite that system resource takies, and effectively improves disposal route and device to the treatment effeciency of electronic form file.
Summary of the invention
Technical matters to be solved by this invention provides a kind of read method of electronic form file, a kind of store method of electronic form file, and a kind of disposal route of electronic form file, the operating resource that reads and preserve for electronic form file takies too much the problem that treatment effeciency is low in the prior art in order to solve.
The present invention also provides a kind of reading device of electronic form file, a kind of save set of electronic form file, and a kind for the treatment of apparatus of electronic form file, in order to the situation that provides said method to use in practice.
For solving the problems of the technologies described above, the embodiment of the invention discloses a kind of read method of electronic form file, comprising:
Read in the array element of electronic form file, described array element comprises Book array and corresponding a plurality of Sheet array, the byte array that described Book array is the Book object, the byte array that described Sheet array is single Sheet object;
Described Book array is loaded as the Book object;
Corresponding Sheet array is determined in selected operation according to user's worksheet, and described Sheet array is loaded as the Sheet object.
Preferably, described method also comprises:
Current default Sheet array is loaded as default Sheet object.
Preferably, the step of described definite Sheet array comprises:
The worksheet of selecting according to the user generates the solicited message of corresponding Sheet array, and described request information comprises the positional information and the identification information of described Sheet array;
Positional information and identification information according to the Sheet array are determined described Sheet array.
Preferably, described method also comprises:
Delete the described Sheet array that has been loaded as the Sheet object.
The embodiment of the invention also discloses a kind of reading device of electronic form file, comprising:
Array element reads in the unit, be used to read in the array element of electronic form file, described array element comprises Book array and corresponding a plurality of Sheet array, the byte array that described Book array is the Book object, the byte array that described Sheet array is single Sheet object;
Book object loading unit is used for described Book array is loaded as the Book object;
Sheet array determining unit is used for according to the definite corresponding Sheet array of the selected operation of user's worksheet;
Sheet object loading unit is used for described Sheet array is loaded as the Sheet object.
Preferably, described reading device also comprises:
Default Sheet object loading unit is used for current default Sheet array is loaded as default Sheet object.
Preferably, described Sheet array determining unit comprises:
Ask subelement, be used for generating according to the worksheet that the user selectes the solicited message of corresponding Sheet array, described request information comprises the positional information and the identification information of described Sheet array;
The locator unit is used for determining described Sheet array according to the positional information and the identification information of Sheet array.
Preferably, described reading device also comprises:
Delete cells is used to delete the described Sheet array that has been loaded as the Sheet object.
The embodiment of the invention also discloses a kind of store method of electronic form file, comprising:
The Sheet array of obtaining the Book object of the electronic form file that needs preservation, the Sheet object that is loaded and not being loaded, the Sheet object that the Sheet array that the described Sheet object that is loaded is determined for the selected operation according to user's worksheet loads, the byte array that described Sheet array is single Sheet object;
Convert described Book object to the Book array, the byte array that described Book array is the Book object;
Convert the described Sheet object that is loaded to the Sheet array;
Sheet array after described Book array, the conversion and the Sheet array that is not loaded are preserved in combination.
Preferably, described combination preservation step comprises:
Described Book array is saved as master file;
Described Sheet array is saved as the content of described master file corresponding document piece.
Preferably, described combination preservation step comprises:
Generate database according to described Book array;
Described Sheet array is saved as the table data of respective field in the described database.
Preferably, described Sheet object carries out the serializing acquisition to being converted to of Sheet array to described sheet object.
The embodiment of the invention also discloses a kind of save set of electronic form file, comprising:
Acquiring unit, be used to obtain Book object, the Sheet object that is loaded of the electronic form file that needs preserve and the Sheet array that is not loaded, the Sheet object that the Sheet array that the described Sheet object that is loaded is determined for the selected operation according to user's worksheet loads, the byte array that described Sheet array is single Sheet object;
Book array converting unit is used for converting described Book object to the Book array byte array that described Book array is the Book object;
Sheet array converting unit is used for converting the described Sheet object that is loaded to the Sheet array;
The unit is preserved in combination, is used to make up Sheet array of preserving after described Book array, the conversion and the Sheet array that is not loaded.
Preferably, described combination is preserved the unit and is comprised:
The Book file is preserved subelement, is used for described Book array is saved as master file;
The Sheet file is preserved subelement, is used for described Sheet array is saved as the content of described master file corresponding document piece.
Preferably, described combination is preserved the unit and is comprised:
The Book database generates subelement, is used for generating database according to described Book array;
The Sheet database is preserved subelement, is used for described Sheet array is saved as the table data of described database respective field.
The embodiment of the invention also discloses a kind of disposal route of electronic form file, comprising:
Read in the array element of electronic form file, described array element comprises Book array and corresponding a plurality of Sheet array, the byte array that described Book array is the Book object, the byte array that described Sheet array is single Sheet object;
Described Book array is loaded as the Book object;
Corresponding Sheet array is determined in selected operation according to user's worksheet, and described Sheet array is loaded as the Sheet object;
The Sheet array of obtaining the Book object of the electronic form file that needs preservation, the Sheet object that is loaded and not being loaded;
Convert described Book object to the Book array;
Convert the described Sheet object that is loaded to the Sheet array;
Sheet array after described Book array, the conversion and the Sheet array that is not loaded are preserved in combination.
Preferably, described disposal route also comprises:
Delete the described Sheet array that has been loaded as the Sheet object.
The embodiment of the invention also discloses a kind for the treatment of apparatus of electronic form file, comprising:
Array element reads in the unit, be used to read in the array element of electronic form file, described array element comprises Book array and corresponding a plurality of Sheet array, the byte array that described Book array is the Book object, the byte array that described Sheet array is single Sheet object;
Book object loading unit is used for described Book array is loaded as the Book object;
Sheet array determining unit is used for according to the definite corresponding Sheet array of the selected operation of user's worksheet;
Sheet object loading unit is used for described Sheet array is loaded as the Sheet object;
Acquiring unit is used to obtain Book object, the Sheet object that is loaded of the electronic form file that needs preserve and the Sheet array that is not loaded;
Book array converting unit is used for converting described Book object to the Book array;
Sheet array converting unit is used for converting the described Sheet object that is loaded to the Sheet array;
The unit is preserved in combination, is used to make up Sheet array of preserving after described Book array, the conversion and the Sheet array that is not loaded.
Preferably, described treating apparatus also comprises:
Delete cells is used to delete the described Sheet array that has been loaded as the Sheet object.
Compared with prior art, the embodiment of the invention has the following advantages:
The present invention is by reducing the degree of coupling of Book object and each Sheet object, when reading book, do not need the byte array of Sheet objects all in the Book object is changed into the Sheet object, and only need dynamically the pairing Sheet array of the worksheet of user capture to be changed into the Sheet object; Correspondingly, when saving workbook, only Sheet object that the user need be read, that be loaded converts the byte array to, and for the Sheet object that is not loaded, because it still is a byte array form, thereby do not need to regenerate, thereby effectively reduced taking of memory source, improved the treatment effeciency of electronic form file.
Description of drawings
Fig. 1 is the process flow diagram of the read method embodiment of a kind of electronic form file of the present invention;
Fig. 2 is the structured flowchart of the reading device embodiment of a kind of electronic form file of the present invention;
Fig. 3 uses preferred embodiment shown in Figure 2 to carry out the process flow diagram that electronic form file reads;
Fig. 4 is the process flow diagram of the store method embodiment of a kind of electronic form file of the present invention;
Fig. 5 is the structured flowchart of the save set embodiment of a kind of electronic form file of the present invention;
Fig. 6 uses preferred embodiment shown in Figure 5 to carry out the process flow diagram that electronic form file is preserved;
Fig. 7 is the process flow diagram of the disposal route embodiment of a kind of electronic form file of the present invention;
Fig. 8 is the structured flowchart of the treating apparatus embodiment of a kind of electronic form file of the present invention.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
One of core idea of the embodiment of the invention is that the corresponding file of the Book object of an electronic form file is divided into multistage with this file inside according to the table page or leaf.After the Book object loads, can generate an array, but the element of array is not the Sheet object, but the byte array of all Sheet objects, when outside need is visited some Sheet, just dynamically the byte array of corresponding Sheet object is loaded as the Sheet object, promptly a table page or leaf that only user is triggered is loaded as the sheet object.Correspondingly, when preserving file, then only the Sheet object that is loaded need be changed into corresponding byte array and write file, the Sheet object that is not loaded, owing to reading the Shi Weizuo conversion, it is the form of byte array still, the file that writes direct gets final product.The present invention is by reducing the degree of coupling of Book object and each Sheet object, when reading book, do not need the byte array of Sheet objects all in the Book object is changed into the Sheet object, and only need dynamically the pairing Sheet array of the worksheet of user capture to be changed into the Sheet object; Correspondingly, when saving workbook, only Sheet object that the user need be read, that be loaded converts the byte array to, and for the Sheet object that is not loaded, because it still is a byte array form, thereby do not need to regenerate, thereby effectively reduced taking of memory source, improved the treatment effeciency of electronic form file.
With reference to figure 1, show the process flow diagram of the read method embodiment of a kind of electronic form file of the present invention, specifically can may further comprise the steps:
Step 101, read in the array element of electronic form file;
Wherein, described array element comprises Book array and corresponding a plurality of Sheet array, the byte array that described Book array is the Book object, the byte array that described Sheet array is single Sheet object;
Step 102, described Book array is loaded as the Book object;
Step 103, corresponding Sheet array is determined in selected operation according to user's worksheet, and described Sheet array is loaded as the Sheet object.
In practice, electronic form file, as report file in EXCEL, the financial software etc., how to create with the book form that comprises a plurality of worksheets, integrate, calculate, export and other processing demands to satisfy user data, for example, in EXCEL, each Workbook (book) object all comprises a set of Worksheet (worksheet) object.
In the present embodiment, for making things convenient for the transmission of data, electronic form file is present in the backstage with the form of byte array, and just the byte array is loaded as memory object when calling.Thereby when reading in electronic form file, what read in is the array element of described electronic form file, i.e. the byte array (a plurality of Sheet array) of byte array of Book object (Book array) and the described a plurality of Sheet objects that comprise.In practice, these Book arrays and Sheet array can constitute a kind of bibliographic structure, as, a master file and corresponding polylith file content, particularly, be about to the Book array as master file, in order to the public information (as title, path etc.) of describing these arrays, the blocks of files that comprises, and the positional information of these blocks of files and identification information; And a plurality of Sheet arrays that described Book array is comprised respectively as the content of the blocks of files that adapts with its positional information and identification information, thereby form one section complete binary data stream.
Preferably, be to improve the transmission efficiency of data, can also be when this partial data stream be formed and when loading, introduce compression and decompression technique, to reduce the size of file, the employing of compression of the present invention and decompression technique does not limit.
When the user activates a book; the Book array that then needs to read in is loaded as the Book object; offer user's operation; in practice, usually also have a default worksheet with book one coactivation, what this default Sheet array may correspondence is first worksheet; what also possibility was corresponding is the worksheet of last user operation; also may be corresponding other worksheet, in this case, present embodiment can also may further comprise the steps:
Current default Sheet array is loaded as default Sheet object.
In the present embodiment promptly, only be that Book array and this default Sheet array are loaded as memory object, and whole worksheets do not carried out loading processing.
Because in the partial data stream of the bibliographic structure that forms before, each worksheet is the appropriate section of corresponding described data stream all, for example, for a master file that comprises a plurality of blocks of files, the blocks of files content of each worksheet all corresponding relevant position information and identification information, thereby, on this loosely-coupled basis, the worksheet of selecting according to the user obtains corresponding Sheet array, can simple realization, for example, a kind of implementation is:
The worksheet of selecting according to the user generates the solicited message of corresponding Sheet array, and described request information comprises the positional information and the identification information of described Sheet array;
Positional information and identification information according to the Sheet array are determined described Sheet array.
Certainly, above-mentioned implementation only is used for for example, and the Sheet array that those skilled in the art adopt any mode to obtain the worksheet that the user selectes all is feasible, for example, in the database that generates according to array element, obtains the Sheet array of respective field; Perhaps, in the Hash table that generates according to array element, getting the mode etc. of the value (Value) of corresponding key word (Key), all is feasible, and the present invention does not need this to limit.
In addition, provide many in the prior art and converted the byte array method of object to, for example:
Adopt the principle of following code to realize:
static?private?Object?bytes2Object(byte?raw[])
throws?IOException,ClassNotFoundException{
ByteArrayInputStream?bais=new?ByteArrayInputStream(raw);
ObjectInputStream?ois=new?ObjectInputStream(bais);
Object?o=ois.readObject();
returno:
}
Perhaps, by the byte array being carried out modes such as unserializing realization, thereby it all is feasible that those skilled in the art rule of thumb maybe need to adopt any method that described byte array is loaded as object, and the present invention does not need this to limit.
After described Sheet array was loaded as the Sheet object, because this Sheet array no longer includes necessity of existence, for further reducing taking of memory source, present embodiment can also may further comprise the steps:
Delete the described Sheet array that has been loaded as the Sheet object.
As can be seen, present embodiment is when reading book, do not need the byte array of Sheet objects all in the Book object is changed into the Sheet object, get final product and only need dynamically the pairing Sheet array of the worksheet of user capture to be changed into the Sheet object, thereby effectively reduce taking of memory source, improved the treatment effeciency of electronic form file.
With reference to figure 2, show the structured flowchart of the reading device embodiment of a kind of electronic form file of the present invention, described reading device 20 specifically can comprise with lower unit:
Array element reads in unit 201, is used to read in the array element of electronic form file;
Wherein, described array element comprises Book array and corresponding a plurality of Sheet array, the byte array that described Book array is the Book object, the byte array that described Sheet array is single Sheet object;
Book object loading unit 202 is used for described Book array is loaded as the Book object;
Sheet array determining unit 203 is used for according to the definite corresponding Sheet array of the selected operation of user's worksheet;
Sheet object loading unit 204 is used for described Sheet array is loaded as the Sheet object.
In practice; when the user activates a book, also have a default worksheet with book one coactivation usually, in this case; present embodiment can also comprise default Sheet object loading unit, is used for current default Sheet array is loaded as default Sheet object.
Preferably, in the present embodiment, described Sheet array determining unit can comprise following subelement:
Ask subelement, be used for generating according to the worksheet that the user selectes the solicited message of corresponding Sheet array, described request information comprises the positional information and the identification information of described Sheet array;
The locator unit is used for determining described Sheet array according to the positional information and the identification information of Sheet array.
For further reducing taking of memory source, in the present embodiment, can also comprise delete cells, be used for after described Sheet array is loaded as the Sheet object, deleting the described Sheet array that has been loaded as the Sheet object.
With reference to figure 3, show application preferred embodiment shown in Figure 2 and carry out the process flow diagram that electronic form file reads, specifically can may further comprise the steps:
Step 301, array element read in the array element that the unit reads in electronic form file;
Wherein, described array element comprises Book array and corresponding a plurality of Sheet array, the byte array that described Book array is the Book object, the byte array that described Sheet array is single Sheet object;
Step 302, Book object loading unit are loaded as the Book object with described Book array;
Step 303, default Sheet object loading unit are loaded as default Sheet object with current default Sheet array;
Step 304, Sheet array determining unit are according to the definite corresponding Sheet array of the selected operation of user's worksheet;
Preferably, can determine corresponding Sheet array according to selected operation of user's worksheet by following substep:
The worksheet that substep A1, request subelement are selected according to the user generates the solicited message of corresponding Sheet array;
Wherein, described request information comprises the positional information and the identification information of described Sheet array;
Described Sheet array is determined according to the positional information and the identification information of Sheet array in substep A2, locator unit.
Step 305, Sheet object loading unit are loaded as the Sheet object with described Sheet array;
Step 306, the described Sheet array that has been loaded as the Sheet object of delete cells deletion.
For device embodiment, because it is substantially corresponding to method embodiment, so description is fairly simple, relevant part gets final product referring to the part explanation of method embodiment.
With reference to figure 4, show the process flow diagram of the store method embodiment of a kind of electronic form file of the present invention, specifically can may further comprise the steps:
Step 401, the Book object that obtains the electronic form file that needs preservation, the Sheet object that is loaded and the Sheet array that is not loaded;
Wherein, the described Sheet that is loaded is to liking to offering user capture, the Sheet object that the corresponding Sheet array that selected operation is determined according to user's worksheet is loaded, the byte array that described Sheet array is single Sheet object;
Step 402, convert described Book object to the Book array;
Wherein, the described Book array byte array that is the Book object;
Step 403, convert the described Sheet object that is loaded to the Sheet array;
Sheet array after described Book array, the conversion and the Sheet array that is not loaded are preserved in step 404, combination.
When the user sends holding instruction of electronic form file, obtain to the Sheet array that can trigger the Book object of the electronic form file that needs preservation, the Sheet object that is loaded and not be loaded, because when reading in electronic form file, corresponding Book array can be loaded as the Book object, the Sheet object that the Sheet array of user capture can be loaded, and when preserving, need convert them to array and preserve.
Because in the present embodiment, the loading behavior of described Sheet object is only implemented at the determined Sheet array of the selected operation of user's worksheet, thereby, the user is not the whole worksheets in the book to be carried out under the situation of visit, Sheet object that the content of the electronic form file that is obtained during preservation comprises the Book object, be loaded and the Sheet array that is not loaded, thereby, present embodiment detailed process in practice can for:
Convert the Book object of this electronic form file to the Book array;
All Sheet elements of traversal Book object if described Sheet element is the Sheet object that is loaded, then convert this Sheet object to the Sheet array; If described Sheet element is the Sheet array, then keep its virgin state;
Make up these arrays according to aforementioned bibliographic structure or alternate manner, preserve to constitute a complete binary data stream.
Particularly, in the present embodiment, can preserve described array element by following substep combination:
Substep B1, described Book array is saved as master file;
Substep B2, described Sheet array saved as the content of described master file corresponding document piece.
As another embodiment, can also preserve described array element by following substep combination:
Substep C1, generate database according to described Book array;
Substep C2, described Sheet array saved as the table data of respective field in the described database.
Certainly, the method that combinations thereof is preserved array element only is used for for example, those skilled in the art according to actual needs or experience to adopt any store method all be feasible, the present invention is not to limiting.
In addition, in the present embodiment, for improving the transmission efficiency of data, can introduce compression and decompression technique when this partial data stream is preserved, to reduce the size of file, certainly, the employing of compression of the present invention and decompression technique does not limit yet.
In the prior art, many methods that object is converted to the byte array are provided, it all is feasible that those skilled in the art people selects for use a kind of arbitrarily, preferably, in the present embodiment, described Sheet object carries out serializing to being converted to of Sheet array to described sheet object and obtains, and for example, can realize with reference to the principle of following code:
If ((o instanceof SheetProxy)) // (o instanceof SheetProxy) expression sheet exists with the form of byte array, does not also change into the sheet object
{
SheetProxy?si=(SheetProxy)o;
Sheet?sheet=new?Sheet(this,si.getSheetName());
_sheets.set(index,sheet);
_provider.loadSheet(sheet,si.getZipBytes());
sheet.getSheetOption().setSelected(si.isSelected());
sheet.getSheetOption().setHide(si.isHide());
sheet.getSheetOption().setTabColor(si.getTabColor());
sheet.setID(si.getID());
public?Sheet?getSheet(int?index)
{
if(checkSheetIndex(index))
{
Object?o=_sheets.get(index);
if((o?instanceof?SheetProxy))
{
SheetProxy?si=(SheetProxy)o;
Sheet?sheet=new?Sheet(this,si.getSheetName());
_sheets.set(index,sheet);
_provider.loadSheet(sheet,si.getZipBytes());
sheet.getSheetOption().setSelected(si.isSelected());
sheet.getSheetOption().set
As can be seen, in the present embodiment, when saving workbook, only Sheet object that the user need be read, that be loaded converts the byte array to, and for the Sheet object that is not loaded, because it still is a byte array form, thereby do not need to regenerate, thereby further reduced taking of memory source, improved the treatment effeciency of electronic form file.
With reference to figure 5, show the structured flowchart of the save set embodiment of a kind of electronic form file of the present invention, described save set 50 specifically can comprise with lower unit:
Acquiring unit 501 is used to obtain Book object, the Sheet object that is loaded of the electronic form file that needs preserve and the Sheet array that is not loaded;
Wherein, the Sheet object that the Sheet array that the described Sheet object that is loaded is determined for the selected operation according to user's worksheet loads, the byte array that described Sheet array is single Sheet object;
Book array converting unit 502 is used for converting described Book object to the Book array;
Wherein, the described Book array byte array that is the Book object;
Sheet array converting unit 503 is used for converting the described Sheet object that is loaded to the Sheet array;
Unit 504 is preserved in combination, is used to make up Sheet array of preserving after described Book array, the conversion and the Sheet array that is not loaded.
Preferably, the preservation of combination described in present embodiment unit can comprise following subelement:
The Book file is preserved subelement, is used for described Book array is saved as master file;
The Sheet file is preserved subelement, is used for described Sheet array is saved as the content of described master file corresponding document piece.
As another embodiment, combination described in the present embodiment is preserved unit further and is comprised following subelement:
The Book database generates subelement, is used for generating database according to described Book array;
The Sheet database is preserved subelement, is used for described Sheet array is saved as the table data of described database respective field.
With reference to figure 6, show and use the process flow diagram that preferred embodiment shown in Figure 5 carries out the electronic form file preservation, specifically can may further comprise the steps:
The Sheet array that step 601, acquiring unit obtain the Book object of the electronic form file that needs preservation, the Sheet object that is loaded and be not loaded;
Wherein, the Sheet object that the Sheet array that the described Sheet object that is loaded is determined for the selected operation according to user's worksheet loads, the byte array that described Sheet array is single Sheet object;
Step 602, Book array converting unit convert described Book object to the Book array;
Wherein, the described Book array byte array that is the Book object;
Step 603, Sheet array converting unit convert the described Sheet object that is loaded to the Sheet array;
Step 604, combination preservation unit combination are preserved Sheet array after described Book array, the conversion and the Sheet array that is not loaded.
For device embodiment, because it is substantially corresponding to method embodiment, so description is fairly simple, relevant part gets final product referring to the part explanation of method embodiment.
With reference to figure 7, show the disposal route of a kind of electronic form file of the present invention, specifically can may further comprise the steps:
Step 701, read in the array element of electronic form file;
Described array element comprises Book array and corresponding a plurality of Sheet array, the byte array that described Book array is the Book object, the byte array that described Sheet array is single Sheet object;
Step 702, described Book array is loaded as the Book object;
Step 703, corresponding Sheet array is determined in selected operation according to user's worksheet, and described Sheet array is loaded as the Sheet object;
Step 704, the Book object that obtains the electronic form file that needs preservation, the Sheet object that is loaded and the Sheet array that is not loaded;
Step 705, convert described Book object to the Book array;
Step 706, convert the described Sheet object that is loaded to the Sheet array;
Sheet array after described Book array, the conversion and the Sheet array that is not loaded are preserved in step 707, combination.
Preferably, for improving the efficient of data transfer, present embodiment can also comprise step: delete the described Sheet array that has been loaded as the Sheet object.
Each step for said method embodiment, for simple description, so it all is expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not subjected to the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in the instructions all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
With reference to figure 8, show the structured flowchart of the treating apparatus embodiment of a kind of electronic form file of the present invention, specifically can comprise with lower unit:
Array element reads in unit 801, is used to read in the array element of electronic form file;
Described array element comprises Book array and corresponding a plurality of Sheet array, the byte array that described Book array is the Book object, the byte array that described Sheet array is single Sheet object;
Book object loading unit 802 is used for described Book array is loaded as the Book object;
Sheet array determining unit 803 is used for according to the definite corresponding Sheet array of the selected operation of user's worksheet;
Sheet object loading unit 804 is used for described Sheet array is loaded as the Sheet object;
Acquiring unit 805 is used to obtain Book object, the Sheet object that is loaded of the electronic form file that needs preserve and the Sheet array that is not loaded;
Book array converting unit 806 is used for converting described Book object to the Book array;
Sheet array converting unit 807 is used for converting the described Sheet object that is loaded to the Sheet array;
Unit 808 is preserved in combination, is used to make up Sheet array of preserving after described Book array, the conversion and the Sheet array that is not loaded.
Preferably, present embodiment can also comprise delete cells, is used to delete the described Sheet array that has been loaded as the Sheet object.
For device embodiment, because it is substantially corresponding to method embodiment, so description is fairly simple, relevant part gets final product referring to the part explanation of method embodiment.
As can be seen, the present invention does not need the byte array of Sheet objects all in the Book object is changed into the Sheet object, and only needs dynamically the pairing Sheet array of the worksheet of user capture to be changed into the Sheet object when reading book; Correspondingly, when saving workbook, only Sheet object that the user need be read, that be loaded converts the byte array to, and for the Sheet object that is not loaded, because it still is a byte array form, thereby do not need to regenerate, thereby effectively reduced taking of memory source, improved the treatment effeciency of electronic form file.
For described Fig. 7 and the not detailed part of description embodiment illustrated in fig. 8, can be referring to the explanation of aforementioned relevant portion, the present invention does not give unnecessary details at this.
Be understandable that the present invention can be used in numerous general or special purpose computingasystem environment or the configuration.For example: personal computer, server computer, handheld device or portable set, plate equipment, multicomputer system, the system based on microprocessor, set top box, programmable consumer-elcetronics devices, network PC, small-size computer, mainframe computer, comprise distributed computing environment of above any system or equipment or the like.
The present invention can describe in the general context of the computer executable instructions of being carried out by computing machine, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract, program, object, assembly, data structure or the like.Also can in distributed computing environment, put into practice the present invention, in these distributed computing environment, by by communication network connected teleprocessing equipment execute the task.In distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium that comprises memory device.
More than to the store method of the reading device of the read method of a kind of electronic form file provided by the present invention, a kind of electronic form file, a kind of electronic form file, a kind of save set of electronic form file.A kind of disposal route of electronic form file and a kind for the treatment of apparatus of electronic form file are described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (19)

1. the read method of an electronic form file is characterized in that, comprising:
Read in the array element of electronic form file, described array element comprises Book array and corresponding a plurality of Sheet array, the byte array that described Book array is the Book object, the byte array that described Sheet array is single Sheet object;
Described Book array is loaded as the Book object;
Corresponding Sheet array is determined in selected operation according to user's worksheet, and described Sheet array is loaded as the Sheet object.
2. read method as claimed in claim 1 is characterized in that, also comprises:
Current default Sheet array is loaded as default Sheet object.
3. read method as claimed in claim 1 or 2 is characterized in that, the step of described definite Sheet array comprises:
The worksheet of selecting according to the user generates the solicited message of corresponding Sheet array, and described request information comprises the positional information and the identification information of described Sheet array;
Positional information and identification information according to the Sheet array are determined described Sheet array.
4. read method as claimed in claim 1 or 2 is characterized in that, also comprises:
Delete the described Sheet array that has been loaded as the Sheet object.
5. the reading device of an electronic form file is characterized in that, comprising:
Array element reads in the unit, be used to read in the array element of electronic form file, described array element comprises Book array and corresponding a plurality of Sheet array, the byte array that described Book array is the Book object, the byte array that described Sheet array is single Sheet object;
Book object loading unit is used for described Book array is loaded as the Book object;
Sheet array determining unit is used for according to the definite corresponding Sheet array of the selected operation of user's worksheet;
Sheet object loading unit is used for described Sheet array is loaded as the Sheet object.
6. reading device as claimed in claim 5 is characterized in that, also comprises:
Default Sheet object loading unit is used for current default Sheet array is loaded as default Sheet object.
7. as claim 5 or 6 described reading devices, it is characterized in that described Sheet array determining unit comprises:
Ask subelement, be used for generating according to the worksheet that the user selectes the solicited message of corresponding Sheet array, described request information comprises the positional information and the identification information of described Sheet array;
The locator unit is used for determining described Sheet array according to the positional information and the identification information of Sheet array.
8. as claim 5 or 6 described reading devices, it is characterized in that, also comprise:
Delete cells is used to delete the described Sheet array that has been loaded as the Sheet object.
9. the store method of an electronic form file is characterized in that, comprising:
The Sheet array of obtaining the Book object of the electronic form file that needs preservation, the Sheet object that is loaded and not being loaded, the Sheet object that the Sheet array that the described Sheet object that is loaded is determined for the selected operation according to user's worksheet loads, the byte array that described Sheet array is single Sheet object;
Convert described Book object to the Book array, the byte array that described Book array is the Book object;
Convert the described Sheet object that is loaded to the Sheet array;
Sheet array after described Book array, the conversion and the Sheet array that is not loaded are preserved in combination.
10. store method as claimed in claim 9 is characterized in that, described combination is preserved step and comprised:
Described Book array is saved as master file;
Described Sheet array is saved as the content of described master file corresponding document piece.
11. store method as claimed in claim 9 is characterized in that, described combination is preserved step and is comprised:
Generate database according to described Book array;
Described Sheet array is saved as the table data of respective field in the described database.
12., it is characterized in that described Sheet object carries out serializing to being converted to of Sheet array to described sheet object and obtains as claim 9,10 or 11 described store methods.
13. the save set of an electronic form file is characterized in that, comprising:
Acquiring unit, be used to obtain Book object, the Sheet object that is loaded of the electronic form file that needs preserve and the Sheet array that is not loaded, the Sheet object that the Sheet array that the described Sheet object that is loaded is determined for the selected operation according to user's worksheet loads, the byte array that described Sheet array is single Sheet object;
Book array converting unit is used for converting described Book object to the Book array byte array that described Book array is the Book object;
Sheet array converting unit is used for converting the described Sheet object that is loaded to the Sheet array;
The unit is preserved in combination, is used to make up Sheet array of preserving after described Book array, the conversion and the Sheet array that is not loaded.
14. save set as claimed in claim 13 is characterized in that, described combination is preserved the unit and is comprised:
The Book file is preserved subelement, is used for described Book array is saved as master file;
The Sheet file is preserved subelement, is used for described Sheet array is saved as the content of described master file corresponding document piece.
15. save set as claimed in claim 14 is characterized in that, described combination is preserved the unit and is comprised:
The Book database generates subelement, is used for generating database according to described Book array;
The Sheet database is preserved subelement, is used for described Sheet array is saved as the table data of described database respective field.
16. the disposal route of an electronic form file is characterized in that, comprising:
Read in the array element of electronic form file, described array element comprises Book array and corresponding a plurality of Sheet array, the byte array that described Book array is the Book object, the byte array that described Sheet array is single Sheet object;
Described Book array is loaded as the Book object;
Corresponding Sheet array is determined in selected operation according to user's worksheet, and described Sheet array is loaded as the Sheet object;
The Sheet array of obtaining the Book object of the electronic form file that needs preservation, the Sheet object that is loaded and not being loaded;
Convert described Book object to the Book array;
Convert the described Sheet object that is loaded to the Sheet array;
Sheet array after described Book array, the conversion and the Sheet array that is not loaded are preserved in combination.
17. disposal route as claimed in claim 16 is characterized in that, also comprises:
Delete the described Sheet array that has been loaded as the Sheet object.
18. the treating apparatus of an electronic form file is characterized in that, comprising:
Array element reads in the unit, be used to read in the array element of electronic form file, described array element comprises Book array and corresponding a plurality of Sheet array, the byte array that described Book array is the Book object, the byte array that described Sheet array is single Sheet object;
Book object loading unit is used for described Book array is loaded as the Book object;
Sheet array determining unit is used for according to the definite corresponding Sheet array of the selected operation of user's worksheet;
Sheet object loading unit is used for described Sheet array is loaded as the Sheet object;
Acquiring unit is used to obtain Book object, the Sheet object that is loaded of the electronic form file that needs preserve and the Sheet array that is not loaded;
Book array converting unit is used for converting described Book object to the Book array;
Sheet array converting unit is used for converting the described Sheet object that is loaded to the Sheet array;
The unit is preserved in combination, is used to make up Sheet array of preserving after described Book array, the conversion and the Sheet array that is not loaded.
19. treating apparatus as claimed in claim 18 is characterized in that, also comprises:
Delete cells is used to delete the described Sheet array that has been loaded as the Sheet object.
CNB2007101660390A 2007-10-30 2007-10-30 Processing method and apparatus for electronic table file Active CN100511212C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007101660390A CN100511212C (en) 2007-10-30 2007-10-30 Processing method and apparatus for electronic table file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007101660390A CN100511212C (en) 2007-10-30 2007-10-30 Processing method and apparatus for electronic table file

Publications (2)

Publication Number Publication Date
CN101145148A true CN101145148A (en) 2008-03-19
CN100511212C CN100511212C (en) 2009-07-08

Family

ID=39207677

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007101660390A Active CN100511212C (en) 2007-10-30 2007-10-30 Processing method and apparatus for electronic table file

Country Status (1)

Country Link
CN (1) CN100511212C (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105550267A (en) * 2015-12-09 2016-05-04 四川广正科技有限公司 Method and system utilizing Excel format data to process welding performance data
CN107632880A (en) * 2017-08-31 2018-01-26 深圳市丰巢科技有限公司 Method for exporting excel data, storage medium and electronic equipment
CN116521845A (en) * 2023-05-05 2023-08-01 四川川大智胜系统集成有限公司 Method for reading complex electronic form file and electronic equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105550267A (en) * 2015-12-09 2016-05-04 四川广正科技有限公司 Method and system utilizing Excel format data to process welding performance data
CN107632880A (en) * 2017-08-31 2018-01-26 深圳市丰巢科技有限公司 Method for exporting excel data, storage medium and electronic equipment
CN107632880B (en) * 2017-08-31 2021-05-04 深圳市丰巢科技有限公司 Method for exporting excel data, storage medium and electronic equipment
CN116521845A (en) * 2023-05-05 2023-08-01 四川川大智胜系统集成有限公司 Method for reading complex electronic form file and electronic equipment
CN116521845B (en) * 2023-05-05 2024-03-05 四川川大智胜系统集成有限公司 Method for reading complex electronic form file and electronic equipment

Also Published As

Publication number Publication date
CN100511212C (en) 2009-07-08

Similar Documents

Publication Publication Date Title
US7924183B2 (en) Method and system for reducing required storage during decompression of a compressed file
US8537160B2 (en) Generating distributed dataflow graphs
CN102129425B (en) The access method of big object set table and device in data warehouse
CN104408100B (en) The compression method of structured web site daily record
CN111061475B (en) Software code generating method, device, computer equipment and storage medium
JP2005518023A5 (en)
CN106855861A (en) File merging method and device and electronic equipment
CN102999480A (en) Method and system for editing document
CN106528896A (en) Database optimization method and apparatus
CN106570153A (en) Data extraction method and system for mass URLs
CN103336812B (en) Web page resources caching method and device for improving second load efficiency
CN100511212C (en) Processing method and apparatus for electronic table file
CN113254445A (en) Real-time data storage method and device, computer equipment and storage medium
CN115237857A (en) Log processing method and device, computer equipment and storage medium
CN113010542A (en) Service data processing method and device, computer equipment and storage medium
CN104583965B (en) Encoded data files are stored on multiple file servers
CN112765270A (en) Block chain data processing method and device, computer equipment and medium
CN102982046B (en) A kind of web data compression and storage method and system
CN106570152A (en) Mobile phone number volume extracting method and system
CN116450723A (en) Data extraction method, device, computer equipment and storage medium
CN115841095A (en) Document establishing method, system, medium and equipment
CN1312550C (en) Method for dumping data to mobile storage medium and extracting data therefrom
CN112612938A (en) Data processing method, device, storage medium and equipment
CN101930451B (en) For storing the method and apparatus of at least one inquiry data element of efficiently searching
WO2017045257A1 (en) Method and system for personalized association of voices and patterns

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant