CN109828985A - A kind of list difference querying method and device - Google Patents

A kind of list difference querying method and device Download PDF

Info

Publication number
CN109828985A
CN109828985A CN201811614062.6A CN201811614062A CN109828985A CN 109828985 A CN109828985 A CN 109828985A CN 201811614062 A CN201811614062 A CN 201811614062A CN 109828985 A CN109828985 A CN 109828985A
Authority
CN
China
Prior art keywords
list
data
column
row
variance
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
CN201811614062.6A
Other languages
Chinese (zh)
Other versions
CN109828985B (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.)
Datang Software Technologies Co Ltd
Original Assignee
Datang Software Technologies 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 Datang Software Technologies Co Ltd filed Critical Datang Software Technologies Co Ltd
Priority to CN201811614062.6A priority Critical patent/CN109828985B/en
Publication of CN109828985A publication Critical patent/CN109828985A/en
Application granted granted Critical
Publication of CN109828985B publication Critical patent/CN109828985B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the present invention provides a kind of list difference querying method and device, which comprises calls the first list and the second list;Based on each column data of first list, inquires in the respective column of second list and correspond to the data of row with the presence or absence of difference in the data of every a line and first list;All variance data labels inquired are shown in first list and/or second list.The above method can be realized directly by programming on the terminal device, not need to avoid the disclosure risk of data in list using third party's variance analysis software;And the above method can disposably realize the contrast difference of the entire form data, and precise and high efficiency improves work efficiency.

Description

A kind of list difference querying method and device
Technical field
The present invention relates to field of computer technology more particularly to a kind of list difference querying methods and device.
Background technique
Contrast difference is carried out to different form datas in the prior art, it generally can be real by the following two kinds of programs It is existing.Scheme one calls the query functions such as SUMPRODUCT, VLOOKUP in formfile;But since these functions are all Data based on column a certain in list compare, so the difference before and after a certain particular column data change can only be compared, it can not The data of whole table are compared, and every time comparison will carry out function sets, be easy to appear input error cause it is defeated Out without result;Scheme two carries out difference inquiry operation using third party's variance analysis software;But it for sensitive data, uses There are security risks for third party software operation, and third party software can occupy the resources such as a large amount of system operations, memory.
It follows that there is not enough safety and cannot be directed in the method for carrying out contrast difference to form data in the prior art The problem of the entire form data are disposably inquired, thus at present be badly in need of one kind can either guarantee data security, again can be disposable The scheme of contrast difference is carried out for the entire form data.
Summary of the invention
In view of this, the embodiment of the present invention proposes a kind of list difference querying method and device, it is poor to solve existing list Different query scheme is not safe enough and cannot be aiming at the problem that the entire form data are disposably inquired.
To solve the above-mentioned problems, the invention discloses a kind of list difference querying methods, which comprises
Call the first list and the second list;
Based on each column data of first list, inquire in the respective column of second list data of every a line with The data of row are corresponded in first list with the presence or absence of difference;
All variance data labels inquired are shown in first list and/or second list.
Preferably, before calling the first list and the second list, comprising:
Receive the operation that Visual Basic editing machine is opened in Excel report file;In the Excel report file Including the first worksheet and the second worksheet;
The first list of the calling and the second list, comprising:
First worksheet and second worksheet are called in the Visual Basic editing machine.
Preferably, each column data based on the first list inquires the number of every a line in the respective column of the second list Include: according to the step whether identical as the data for corresponding to row in first list
S1: judgement is located at M (1≤M≤the first in N (columns of the list of the 1≤N≤first) column of first list The line number of list) row the first data Nth column corresponding with second list in M row the second data it is whether identical;
S2: in second data situation identical with first data, first scheme is executed;The first scheme It include: M+1 in the third data Nth column corresponding with second list of M+1 row in the Nth column for judge first list Whether the 4th capable data are identical;
In the case where second data are different from first data, alternative plan is executed;The alternative plan packet It includes: second data and/or first data being marked in list where it and are shown;And after label display, return The step of receipt row first scheme;
S3: being every time current line number+1, and circulation executes step S2, until having inquired first list and second table All rows of single Nth column;
S4: successively executing step S1, step S2, inquires the institute of the N+1 column of first list and second list There are capable data;
S5: being every time current columns+1, and circulation executes step S4, until having inquired first list and second table All column in list.
Preferably, all variance datas labels that will be inquired are shown in first list and/or described the Two lists, comprising:
In the case where it is empty data that the variance data, which does not include value, by the cell where the variance data into Line flag shows, or, by the variance data by in the distinguishing font of its affiliated form data, font size, color three One of which is shown;
In the case where it is empty data that the variance data, which includes value, the cell where the variance data is carried out Label display.
A kind of list difference inquiry unit is also disclosed in the embodiment of the present invention, and described device includes:
Calling module, for calling the first list and the second list;
Enquiry module is inquired in the respective column of second list for each column data based on first list The data of row are corresponded in the data of every a line and first list with the presence or absence of difference;
Display module, for all variance datas labels inquired to be shown in first list and/or described Second list.
Preferably, described device further include:
Module is opened, for receiving the operation for opening Visual Basic editing machine in Excel report file;It is described It include the first worksheet and the second worksheet in Excel report file;
The calling module includes: calling submodule, for calling described in the Visual Basic editing machine One worksheet and second worksheet.
Preferably, the enquiry module includes:
S1 submodule, for judging the M (1 in N (columns of the list of the 1≤N≤first) column of first list The line number of the list of≤M≤first) row the first data Nth column corresponding with second list in the second data of M row be It is no identical;
S2 submodule, for executing first scheme in second data situation identical with first data;Institute Stating first scheme includes: the third data of M+1 row corresponding with second list in the Nth column for judge first list Whether the 4th data of M+1 row are identical in N column;
In the case where second data are different from first data, alternative plan is executed;The alternative plan packet It includes: second data and/or first data being marked in list where it and are shown;After label display, return The step of executing first scheme;
S3 submodule, for every time be current line number+1, circulation execute step S2, until inquire first list with All rows of the second list Nth column;
S4 submodule inquires the of first list and second list for successively executing step S1, step S2 The data of all rows of N+1 column;
S5 submodule, for every time be current columns+1, circulation execute step S4, until inquire first list with All column in second list.
Preferably, the display module includes:
First display sub-module, in the case where it is empty data that the variance data, which does not include value, by the difference Display is marked according to the cell at place in heteromerism, or, the variance data is passed through distinguishing with its affiliated form data Font, font size, one of which is shown in color three;
Second display sub-module, in the case where it is empty data that the variance data, which includes value, by the difference Display is marked in cell where data.
Compared with prior art, the present invention has the advantage that
In embodiments of the present invention, by the first list of calling and the second list, then based on each of first list Column data, inquire in the respective column of second list corresponded in the data of every a line and first list row data whether It has differences, all variance data labels inquired is finally shown in first list and/or second list. The above method can be realized directly by programming on the terminal device, not need to avoid using third party's variance analysis software The disclosure risk of data in list;And the above method can disposably realize the contrast difference of the entire form data, accurate high Effect, improves work efficiency.
Detailed description of the invention
Fig. 1 shows the flow chart of one of embodiment of the present invention one list difference querying method;
Fig. 2-1 shows realizing in the embodiment of the present invention two under the VisualBasic editing machine of Excel report file List difference querying method flow chart;
Fig. 2-2 shows the signal of the first list using " this weekly data " as form name in the embodiment of the present invention two Figure;
Fig. 2-3 shows the signal of the second list using " upper weekly data " as form name in the embodiment of the present invention two Figure;
Fig. 2-4 shows the page schematic diagram opened after visual basic editing machine in the embodiment of the present invention two;
Fig. 2-5 shows the edit page schematic diagram of the visual basic editing machine in the embodiment of the present invention two;
Fig. 2-6 shows the operation page schematic diagram of the visual basic editing machine in the embodiment of the present invention two;
Fig. 2-7 shows the operation result page schematic diagram of the visual basic editing machine in the embodiment of the present invention two;
Fig. 3 shows the structural block diagram of one of embodiment of the present invention three list difference inquiry unit.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
Embodiment one
Referring to Fig.1, the flow chart of one of embodiment of the present invention one list difference querying method is shown, it specifically can be with Include the following steps:
Step 101, the first list and the second list are called.
In embodiments of the present invention, list can be a kind of electronics text for indicating several data in terms of rows and columns Part, wherein several described data are located at the infall of row and column in list.Specifically, list can be one and include There is an Excel report file of M (M >=1) row, N (N >=1) column data, is also possible to draw in a document one and includes M Row, N column data electrical form, be also possible to one include M row, N column data matrix.For the existence form of list, The embodiment of the present invention is not specifically limited.In addition, if two groups of data of difference to be compared are not to exist in the form of list, It then needs to distinguish two groups of data in two parts of lists of typing, to facilitate subsequent calls formfile to carry out difference inquiry.
Specifically, the embodiment of the present invention needs to compare the difference of two formfiles, so to be compared firstly the need of calling Two formfiles, i.e. the first list and the second list.For example, first list can be and adopt in specific work process This weekly data of collection, and second list can be the data in acquisition in upper one week, i.e., upper weekly data.Calling formfile When, it is necessary first to storage path of two formfiles in terminal device is obtained, is then stored in by programming language calling Formfile in specific path.
For example, if inquiring two Excel tables using Visual Basic (visualizing basic programming language) programmed environment Single difference, then, call the process of two Excel formfiles can be as described below:
Firstly, newly establishing the engineering of a Visual Basic, a button (button) is set, is named simultaneously for button Define each layer object of Excel.The reason of defining each layer object of Excel is because Excel is with hierarchical structure tissue pair As containing there are many different object elements in object model.Wherein, first layer: Application object, i.e. Excel sheet Body;The second layer: workbooks object set refers to the workbook file of Excel;Third layer: worksheets object set, expression It is a worksheet of Excel;4th layer: Cells and Range object, the cell being directed toward in Excel worksheet, so first It first needs to define above layers object.
Each layer object of following language definition Excel can be used for example:
Dim xlapp As Excel.Application' defines Excel object
Dim xlbook As Excel.Workbook' defines book
Dim xlsheet As Excel.Worksheet' defines worksheet
Then, if first list and the second list are two different work in the same Excel workbook respectively Table, the then programming language for calling one of formfile to use can be with are as follows: ' Set xlsheet= Xlapp.Worksheets.Open (weekly data .xls " on App.Path& ") ', means and opens in the App.path of path Existing upper weekly data .xls workpiece book file.
In addition, if the first list and the second list are located in the same Excel workbook, because of Excel report file Itself has the function of visual basic editing machine, it is possible to include directly the first list and the second list Visual basic editing machine is opened in Excel workbook, and the first list and the are called in visual basic editing environment Two lists.Namely:
Preferably, before calling the first list and the second list, comprising:
Receive the operation that visual basic editing machine is opened in Excel report file;In the Excel report file Including the first worksheet and the second worksheet;The first list of the calling and the second list, comprising:
First worksheet and second worksheet are called in the Visual Basic editing machine.
In embodiments of the present invention, specifically, after opening Excel report file, can there are two types of method enter Visual basic editor interface.Method 1: finding the Tools menu in Excel menu, selects " macro ", selects again after Select " Visual Basic editing machine ".Method 2: inputting Alt+F11 shortcut key on keyboard, i.e., openable visual basic is compiled Collect the page.After entering visual basic edit page, directly " sheet. form name " is used can to call in a program Worksheetfile.
The inquiry of list difference is carried out using the Visual Basic editing machine function that Excel is carried, avoids and uses other Programming software needs to call the program of formfile first, simplifies the process of difference inquiry, is simple and efficient.
Step 102, each column data based on first list inquires every a line in the respective column of second list Data and first list in correspond to the data of row with the presence or absence of difference.
In embodiments of the present invention, a reference column is selected first in the first list, and is arranged with the benchmark as standard, with Respective column in second list compares.In comparison, since the first row data of the reference column, compare line by line, finally The data of the every a line of the reference column are completed in comparison;Then, then in the same way, using an other column for first list as Reference column, then compare line by line;Until complete first list of final taking turn and all columns and rows of the second list.
It should be noted that during the comparison process, if encountering some cell data value in the first list is sky, i.e., The cell does not have data, and in the corresponding cell of corresponding second list, data value is not empty situation, at this point, The data at two list corresponding unit lattice are considered as to have differences.
Preferably, each column data based on the first list inquires the number of every a line in the respective column of the second list Include: according to the step whether identical as the data for corresponding to row in first list
S1: judgement is located at M (1≤M≤the first in N (columns of the list of the 1≤N≤first) column of first list The line number of list) row data Nth column corresponding with second list in M row data it is whether identical;
S2: in the identical situation of the data, first scheme is executed;The first scheme includes: to judge described first Whether the data of M+1 row are identical in the data of M+1 row Nth column corresponding with second list in the Nth column of list;
In the case where the data are different, alternative plan is executed;The alternative plan includes: by the data in its institute List in mark display;And after label display, the step of executing first scheme is returned;
S3: being every time current line number+1, and circulation executes step S2, until having inquired first list and second table All rows of single Nth column;
S4: successively executing step S1, step S2, inquires the institute of the N+1 column of first list and second list There are capable data;
S5: being every time current columns+1, and circulation executes step S4, until having inquired first list and second table All column in list.
In embodiments of the present invention, initially enter step S1: judgement is located at the N (list of 1≤N≤first in the first list Columns) arrange first data of M (line number of the list of 1≤M≤first) row, the of Nth column M row corresponding with the second list Whether two data are identical.Specifically, can be first since N=1 and M=1, i.e., judgement arranges the 1st row positioned at the first list the 1st Whether the first data and the second data for arranging the 1st row positioned at the second list the 1st are identical.
It enters step S2: according to the judging result of step S1, two schemes can be divided to execute.If the first data and the second number According to identical, execution first scheme, as current line number+1 continues to the second number in the first data in the first list and the second list It is compared according to corresponding next data.Specifically, the third data of 2nd row can be arranged first list the 1st The 1st the 4th data for arranging the 2nd row corresponding with second list are compared.If comparison result is still identical, continue as working as Preceding line number+1 compares the corresponding next data of the 4th data in third data in the first list and the second list Compared with.In comparison procedure, if judging, two data are variant, execute alternative plan, it may be assumed that by the variance data in its institute List in mark display;After label display, the step of executing first scheme is returned.As current line number+1, continues pair The corresponding next data of the second data are compared in the first data and the second list in first list.
It enters step S3: being every time current line number+1, circulation executes step S2, until having inquired first list and institute State all rows of the second list Nth column.Specifically, if the line number of the first list is less than the second list, first can inquired Stop inquiring after all rows of list, and the corresponding data of cell of the second list remaining rows are set to difference number According to.If the line number of the first list is more than the second list, inquiry can be stopped after all rows for having inquired the second list, and The corresponding data of cell of the first list remaining rows are set to variance data.
It enters step S4: successively executing step S1, step S2, inquire the N+ of first list and second list The data of all rows of 1 column.
It enters step S5: being every time current columns+1, circulation executes step S4, until having inquired first list and institute State all column in the second list.Similarly, if the columns of the first list is less than the second list, the first list can inquired All column after stop inquiring, and the corresponding data of cell of the second list remaining columns are set to variance data. If the columns of the first list is more than the second list, inquiry can be stopped after all column for having inquired the second list, and will The corresponding data of cell of the first list remaining columns are set to variance data.
Step 103, all variance data labels inquired are shown in first list and/or second table It is single.
In embodiments of the present invention, during comparing inquiry to the first list and the second list in a step 102, If inquiring variance data, by the variance data being marked in a manner of preset, to facilitate which user can be visually seen A little data are variance datas.In label, as needed, discrepant data in two lists can be marked first simultaneously In list and the second list, can also only it be tagged in one of list.
It preferably, will be where the variance data in the case where it is empty data that the variance data, which does not include value, Display is marked in cell, or, by the variance data by with the distinguishing font of its affiliated form data, font size, face Wherein at least one is shown in color three;
In the case where it is empty data that the variance data, which includes value, the cell where the variance data is carried out Label display.
In embodiments of the present invention, it for the variance data checked out, needs that display for the variance data is marked. Wherein, first method can choose the cell where variance data display is marked;For example, can be by the unit The integral color of lattice is highlighted using the color different from former list, or can be done in the quadrangle of the cell with color mark Note etc.;Second method, can choose for the variance data itself setting with the distinguishing font of affiliated form data, font size, Color etc., so that variance data and identical data be distinguished.
It should be noted that second of side cannot be used in the case where it is empty data that the variance data, which includes value, Method.Because data, as mentioned null cell are not present for the cell where empty data in value.It so, just can not be the dummy cell Corresponding font, font size, color etc. is arranged in lattice.
Embodiment two
Fig. 2-1 is provided by Embodiment 2 of the present invention a kind of under the Visual Basic editing machine of Excel report file The list difference querying method of realization is a kind of preferred implementation side of the list difference querying method in the embodiment of the present invention one Method can specifically include following steps:
Step 201, Excel report file is opened, and the first list for needing to inquire difference and the second list are made respectively It is placed in the same Excel workbook for the first worksheet and the second worksheet.
In embodiments of the present invention, for example, first worksheet and second worksheet can be respectively to need to compare Compared with " this weekly data " and " upper weekly data ", will described in " this weekly data " and " upper weekly data " be put into the same Excel workbook, I.e. as shown in schematic diagram 2-2, schematic diagram 2-3.
Wherein, Fig. 2-2 shows the schematic diagram of the first list using " this weekly data " as form name;Fig. 2-3 is shown Using " upper weekly data " as the schematic diagram of second list of form name.The first row data in two lists are field name Claim, all data in two lists are respectively positioned on the infall of row and column.
Step 202, Visual Basic editing machine is opened in the Excel report file.
It can be there are two types of method as previously mentioned, opening Visual Basic editing machine.It can be found in Excel menu The Tools menu selects " macro ", into rear reselection " Visual Basic editing machine ";Alt+ can also be inputted on keyboard F11 shortcut key, i.e., openable visual basic edit page.
As in Figure 2-4, the page schematic diagram opened after visual basic editing machine is shown.On the page top End is menu bar, the menucommands such as exploitation, debugging and preservation comprising application program;It is toolbar below menu bar, includes Some common quick bottons;It is tool box on the left of the page, placed various controls;White space among the page sets for forms Gauge window, for editing, designing program.In addition, further including engineering resource manager window, property window, window on the page Body is laid out window etc..
Step 203, in the program of the edit page input list difference querying method of the visual basic editing machine Code.
In embodiments of the present invention, Fig. 2-5 shows the edit page schematic diagram of visual basic editing machine.Specifically Ground can double-click the location options in window design device window (i.e. region in Fig. 2-4 in dotted line frame), in window design device window " general " printed words below edit box in input program code.
The method and step of S1-S5 in list difference querying method described according to embodiments of the present invention can design corresponding Program code.The following are the code samples that the method and step according to S1-S5 is write:
Sub data comparison ()
It should be noted that above-mentioned code is only one of the code realization method of the object of the invention, those skilled in the art Other write on present subject matter according to the actual situation realize code, also within that scope of the present invention.
Step 204, said program code is run in the visual basic editing machine.
In embodiments of the present invention, Fig. 2-6 shows the operation page schematic diagram of visual basic editing machine.In code After the completion of editor, it can click in Fig. 2-6 in visual basic the editor toolbar in virtual coilPlay button is checked Operating condition.
Step 205, operation result is checked in first list and/or the second list.
In embodiments of the present invention, Fig. 2-7 shows the operation result page schematic diagram of visual basic editing machine.? In Fig. 2-7, the cell for being filled to be black is cell where variance data.
In conclusion in embodiments of the present invention, by the first list of calling and the second list, then being based on first table Single each column data is inquired in the respective column of second list and corresponds to row in the data of every a line and first list Data whether there is difference, and all variance datas labels inquired are finally shown in first list and/or described Second list.The above method can be realized directly by programming on the terminal device, not need soft using third party's variance analysis Part avoids the disclosure risk of data in list;And the above method can disposably realize the difference pair of the entire form data Than precise and high efficiency improves work efficiency.
In addition, by the Visual Basic editing machine of Excel report file run the first list of symbol lookup and The difference of second list eliminates and needs the step of calling the first list and the second list using other programming tools, can be fast Speed, the variance data for accurately inquiring the first list and the second list, this method is simple and fast, securely and reliably.
Embodiment three
Referring to Fig. 3, the structural block diagram of one of embodiment of the present invention three list difference inquiry unit 300 is shown, is had Body may include:
Calling module 301, for calling the first list and the second list;
Enquiry module 302 inquires the respective column of second list for each column data based on first list In every a line data and first list in correspond to the data of row with the presence or absence of difference;
Display module 303, for all variance data labels inquired to be shown in first list and/or institute State the second list.
Preferably, described device 300 further include:
Module is opened, for receiving the operation for opening VB editing machine in Excel report file;The Excel report text It include the first worksheet and the second worksheet in part;
The calling module 301 includes: calling submodule, for calling first worksheet in the VB editing machine With second worksheet.
Preferably, the enquiry module 302 includes:
S1 submodule, for judging the M (1 in N (columns of the list of the 1≤N≤first) column of first list The line number of the list of≤M≤first) row the first data Nth column corresponding with second list in the second data of M row be It is no identical;
S2 submodule, for executing first scheme in second data situation identical with first data;Institute Stating first scheme includes: the third data of M+1 row corresponding with second list in the Nth column for judge first list Whether the 4th data of M+1 row are identical in N column;
In the case where second data are different from first data, alternative plan is executed;The alternative plan packet It includes: second data and/or first data being marked in list where it and are shown;And after label display, return The step of receipt row first scheme;
S3 submodule, for every time be current line number+1, circulation execute step S2, until inquire first list with All rows of the second list Nth column;
S4 submodule inquires the of first list and second list for successively executing step S1, step S2 The data of all rows of N+1 column;
S5 submodule, for every time be current columns+1, circulation execute step S4, until inquire first list with All column in second list.
Preferably, the display module 303 includes:
First display sub-module, in the case where it is empty data that the variance data, which does not include value, by the difference Display is marked according to the cell at place in heteromerism, or, by the variance data by having differentiation with its affiliated form data Font, font size, one of which is shown in color three;
Second display sub-module, in the case where it is empty data that the variance data, which includes value, by the difference Display is marked in cell where data.
It is poor that list difference inquiry unit 300 provided in an embodiment of the present invention can be realized list in the embodiment of the method for Fig. 1 Each process that different querying method is realized, to avoid repeating, which is not described herein again.
In embodiments of the present invention, by the first list of calling and the second list, then based on each of first list Column data, inquire in the respective column of second list corresponded in the data of every a line and first list row data whether It has differences, all variance data labels inquired is finally shown in first list and/or second list. The above method can be realized directly by programming on the terminal device, not need to avoid using third party's variance analysis software The disclosure risk of data in list;And the above method can disposably realize the contrast difference of the entire form data, accurate high Effect, improves work efficiency.
Preferably, the embodiment of the present invention also provides a kind of terminal device, including processor, and memory is stored in memory Computer program that is upper and can running on the processor, the computer program realize that above-mentioned list is poor when being executed by processor Each process of different querying method embodiment, and identical technical effect can be reached, to avoid repeating, which is not described herein again.
The embodiment of the present invention also provides a kind of computer readable storage medium, and meter is stored on computer readable storage medium Calculation machine program, the computer program realize each process of above-mentioned list difference querying method embodiment when being executed by processor, And identical technical effect can be reached, to avoid repeating, which is not described herein again.Wherein, the computer readable storage medium, Such as read-only memory (Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, letter Claim RAM), magnetic or disk etc..
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form belongs within protection of the invention.

Claims (8)

1. a kind of list difference querying method, which is characterized in that the described method includes:
Call the first list and the second list;
Based on each column data of first list, inquire in the respective column of second list data of every a line with it is described The data of row are corresponded in first list with the presence or absence of difference;
The all differences data markers inquired are shown in first list and/or second list.
2. the method according to claim 1, wherein before calling the first list and the second list, comprising:
Receive the operation that Visual Bas ic editing machine is opened in Excel report file;It is wrapped in the Excel report file Include the first worksheet and the second worksheet;
The first list of the calling and the second list, comprising:
First worksheet and second worksheet are called in the Visual Bas ic editing machine.
3. the method according to claim 1, wherein each column data based on the first list, inquiry the The whether identical step of data for corresponding to row in the respective column of two lists in the data of every a line and first list includes:
S1: judgement is located at the M (list of 1≤M≤first in N (columns of the list of the 1≤N≤first) column of first list Line number) row the first data Nth column corresponding with second list in M row the second data it is whether identical;
S2: in second data situation identical with first data, first scheme is executed;The first scheme packet It includes: judging M+1 row in the third data of M+1 row in the Nth column of first list Nth column corresponding with second list The 4th data it is whether identical;
In the case where second data are different from first data, alternative plan is executed;The alternative plan include: by Second data and/or first data mark display in the list where it;And after label display, returns and execute The step of first scheme;
S3: being every time current line number+1, and circulation executes step S2, until having inquired first list and second list the All rows of N column;
S4: successively executing step S1, step S2, inquires all rows of the N+1 column of first list and second list Data;
S5: being every time current columns+1, and circulation executes step S4, until having inquired in first list and second list All column.
4. the method according to claim 1, wherein all variance data label displays that will be inquired In first list and/or second list, comprising:
In the case where it is empty data that the variance data, which does not include value, the cell where the variance data is marked Note display, or, by the variance data by in the distinguishing font of its affiliated form data, font size, color three wherein It is a kind of to be shown;
In the case where it is empty data that the variance data, which includes value, the cell where the variance data is marked Display.
5. a kind of list difference inquiry unit, which is characterized in that described device includes:
Calling module, for calling the first list and the second list;
Enquiry module is inquired each in the respective column of second list for each column data based on first list The data of row are corresponded in capable data and first list with the presence or absence of difference;
Display module, for all variance data labels inquired to be shown in first list and/or described second List.
6. device according to claim 5, which is characterized in that described device further include:
Module is opened, for receiving the operation for opening Visual Bas ic editing machine in Excel report file;The Excel It include the first worksheet and the second worksheet in report file;
The calling module includes: calling submodule, for calling first work in the Visual Bas ic editing machine Make table and second worksheet.
7. device according to claim 5, which is characterized in that the enquiry module includes:
S1 submodule, for judging M (1≤M in N (columns of the list of the 1≤N≤first) column of first list The line number of≤the first list) row the first data Nth column corresponding with second list in M row the second data whether phase Together;
S2 submodule, for executing first scheme in second data situation identical with first data;Described One scheme includes: the third data Nth column corresponding with second list of M+1 row in the Nth column for judge first list In M+1 row the 4th data it is whether identical;
In the case where second data are different from first data, alternative plan is executed;The alternative plan include: by Second data and/or first data mark display in the list where it;And after label display, returns and execute The step of first scheme;
S3 submodule, for being every time current line number+1, circulation executes step S2, until having inquired first list and described All rows of second list Nth column;
S4 submodule inquires the N+1 of first list and second list for successively executing step S1, step S2 The data of all rows of column;
S5 submodule, for being every time current columns+1, circulation executes step S4, until having inquired first list and described All column in second list.
8. device according to claim 5, which is characterized in that the display module includes:
First display sub-module, in the case where it is empty data that the variance data, which does not include value, by the difference number Display is marked according to the cell at place, or, by the variance data by with the distinguishing font of its affiliated form data, One of which is shown in font size, color three;
Second display sub-module, in the case where it is empty data that the variance data, which includes value, by the variance data Display is marked in the cell at place.
CN201811614062.6A 2018-12-27 2018-12-27 Form difference query method and device Active CN109828985B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811614062.6A CN109828985B (en) 2018-12-27 2018-12-27 Form difference query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811614062.6A CN109828985B (en) 2018-12-27 2018-12-27 Form difference query method and device

Publications (2)

Publication Number Publication Date
CN109828985A true CN109828985A (en) 2019-05-31
CN109828985B CN109828985B (en) 2021-06-25

Family

ID=66860561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811614062.6A Active CN109828985B (en) 2018-12-27 2018-12-27 Form difference query method and device

Country Status (1)

Country Link
CN (1) CN109828985B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112329388A (en) * 2020-11-30 2021-02-05 深圳集智数字科技有限公司 Data display method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1801197A (en) * 2005-01-07 2006-07-12 环隆电气股份有限公司 Difference data integration and comparison method
CN101807207A (en) * 2010-03-22 2010-08-18 北京大用科技有限责任公司 Method for sharing document based on content difference comparison
CN102200968A (en) * 2011-05-30 2011-09-28 深圳市五巨科技有限公司 Method and device for removing duplications of EXCEL form data
CN105740465A (en) * 2016-03-04 2016-07-06 浪潮软件集团有限公司 Flexible custom comparison method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1801197A (en) * 2005-01-07 2006-07-12 环隆电气股份有限公司 Difference data integration and comparison method
CN101807207A (en) * 2010-03-22 2010-08-18 北京大用科技有限责任公司 Method for sharing document based on content difference comparison
CN102200968A (en) * 2011-05-30 2011-09-28 深圳市五巨科技有限公司 Method and device for removing duplications of EXCEL form data
CN105740465A (en) * 2016-03-04 2016-07-06 浪潮软件集团有限公司 Flexible custom comparison method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
YNZSVT: ""https://zhidao.baidu.com/question2015351486776373588.html"", 《百度经验》 *
陈秀峰: ""也谈比较两个表格的异同"", 《电脑爱好者》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112329388A (en) * 2020-11-30 2021-02-05 深圳集智数字科技有限公司 Data display method and device

Also Published As

Publication number Publication date
CN109828985B (en) 2021-06-25

Similar Documents

Publication Publication Date Title
US5255363A (en) Graph-based programming system and associated method
US4813013A (en) Schematic diagram generating system using library of general purpose interactively selectable graphic primitives to create special applications icons
US5966512A (en) Groupware save operation
US5121499A (en) Method for controlling the order of editing cells in a spreadsheet by evaluating entered next cell attribute of current cell
US6369836B1 (en) Cause effect diagram program
US9405507B2 (en) Tabular data sorting and display
US5450545A (en) Generation of rules-based computer programs using data entry screens
CN101361064A (en) A text editing apparatus and method
CN103500257B (en) DWG-format drawing identification method and system
CN101196963B (en) Indexing system and method of generic chemical structure
CN106598570A (en) Construction and display method of multilevel menu in embedded system
CN109828985A (en) A kind of list difference querying method and device
US20040098673A1 (en) System and method for managing reference values
CN106777991A (en) A kind of visual edit registers the method and system of the page
CN104020996B (en) Instruction front-end system and corresponding instruction front-end interactive method
EP0112179B1 (en) Data processing apparatus with automatic mode determination
CN115392198A (en) Traceable method and system based on rich text editor under domestic terminal
CN107092716A (en) The implementation method and device of a kind of Electronic Design
CN112820433B (en) Early warning method and device for nuclear power operating system of nuclear power station and electronic equipment
Douthart et al. Cloning simulation in the cage environment
Day Computer aided software engineering (CASE)
CN107102978A (en) Data earth-filling method, device and mobile terminal
Zimmerman et al. CRAW—An Expert System for Nuclear Reactor Cover Gas Alarm Analysis
CN107025314B (en) Reverse triggering type SCL model checking method
JPH0523453B2 (en)

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