CN105446950A - Output method of data of excel files - Google Patents

Output method of data of excel files Download PDF

Info

Publication number
CN105446950A
CN105446950A CN201511005340.4A CN201511005340A CN105446950A CN 105446950 A CN105446950 A CN 105446950A CN 201511005340 A CN201511005340 A CN 201511005340A CN 105446950 A CN105446950 A CN 105446950A
Authority
CN
China
Prior art keywords
content
row
cell
output
excel
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
CN201511005340.4A
Other languages
Chinese (zh)
Other versions
CN105446950B (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.)
Shandong Mass Institute Of Information Technology
Original Assignee
Shandong Mass Institute Of Information Technology
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 Shandong Mass Institute Of Information Technology filed Critical Shandong Mass Institute Of Information Technology
Priority to CN201511005340.4A priority Critical patent/CN105446950B/en
Publication of CN105446950A publication Critical patent/CN105446950A/en
Application granted granted Critical
Publication of CN105446950B publication Critical patent/CN105446950B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an output method of data of excel files, relates to the field of computers, and aims to output the excel files in a verilog format via a self-provided programming language vba of excel. The output method comprises the following steps: if row output of the excel element tables is selected, setting one row in each element table as an identification row first, wherein according to the figure in each cell in the identification row, a user can determine whether the line in which the cell exist is to be output or not; and calculating the length of the longest character in each line of cells according to all cells used in a round robin element table and line round robin. The output method has the advantages that output is fast; the work efficiency is greatly improved; manpower is saved; and the data output accuracy is greatly improved.

Description

A kind of output intent of excel file data
Technical field
The present invention relates to computer realm, specifically a kind of output intent of excel file data.
Background technology
In the kanas project of company, when doing Protocol Design, write for convenience and understanding, each variable used in agreement is all recorded in excel document, each in excel cell list arranges the variable represented in agreement, and every a line represents the combined situation of a kind of clear shape of these variablees.The variable change situation of such use excel cell list record is write and is searched conveniently, also raises the efficiency when revising simultaneously and read.When agreement will be input to design tool, design tool requires that the agreement of input must meet the syntax format of Verilog language (a kind of hardware description language).So, the protocol tables existed with excel form type is needed to be converted into the syntax format meeting Verilog, traditional conversion method manually exports line by line, but manually export, simple copying pastes that to replace the problem brought be that the cell in a cell list is a lot, and error rate is very high, and it is not high, time-consuming in efficiency.
Summary of the invention
The present invention is directed to the weak point of current needs and prior art development, the programming language vba language providing a kind of excel of utilization to carry (a kind of programming language of office instrument) realizes the method that the output of excel file layout is verilog file layout.
The output intent of a kind of excel file data of the present invention, the technical scheme solving the problems of the technologies described above employing is as follows: the output intent of described excel file data, it is verilog file layout that the programming language vba language utilizing excel to carry realizes the output of excel file layout, if select the row of excel cell list to export, first in setting unit table, a line is as mark row, and the numerical value in each cell in this mark row determines whether the row at this element lattice place export; Then calculate character length the longest in every column unit lattice, by all cells used in repeating query cell list, according to row repeating query, calculate the character length that in often arranging, cell is the longest.
Preferably, if the curriculum offering in mark row cell is 1, then do not need to export respective column content, if the content in cell is other value or vacant, then need the content exporting respective column.
Preferably, the output intent of described excel file data also comprises and arranges output file, sets the file path and title that export.
Preferably, read line cell content, from except the first step identify row except the first row read first row cell in content.
Preferably, read column unit lattice content, and export according to parameters.
Preferably, whether the content determined in this element lattice according to the content in the mark row of this element lattice column outputs in Verilog file; If export, after having exported this cell content, the longer content-length value exporting row corresponding to this element lattice deducts the space of the number of the value after this element lattice content-length value.
The beneficial effect that the output intent of a kind of excel file data of the present invention compared with prior art has is: the format conversion that the programming language vba language that the present invention utilizes excel to carry realizes file exports, traditional craft is exported data and is improved to software simulating, make to export fast, substantially increase work efficiency, save artificial; Only need consider output format, the probability of makeing mistakes is reduced to zero, make data export accuracy and greatly improve; In verilog file after output, marshalling is attractive in appearance, facilitates the reading of this formatted file.
Accompanying drawing explanation
Accompanying drawing 1 is the process flow diagram of the output intent of described excel file data.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly understand, below in conjunction with specific embodiment, and with reference to accompanying drawing, the output intent of a kind of excel file data of the present invention is further described.
The present invention is exactly the output intent proposing a kind of excel file data for the problems referred to above, the programming language vba language (a kind of programming language of office instrument) utilizing excel to carry realizes excel file layout and exports as verilog file layout, the format conversion realizing file exports, improve work efficiency, reduce the probability of makeing mistakes.
The output intent of excel file data of the present invention, if select the row of excel cell list to export, first in setting unit table, a line is as mark row, and the numerical value in each cell in this statusline determines whether the row at this element lattice place export; If the curriculum offering in cell is 1, then do not need to export respective column content, if the content in cell is other value or vacant, then need the content exporting respective column.Then, calculate character length the longest in every column unit lattice, by all cells used in repeating query cell list, according to row repeating query, calculate the character length that in often arranging, cell is the longest.
Embodiment:
A kind of output intent of excel file data described in the present embodiment, as shown in Figure 1, this output intent selects the row of excel cell list to export, and mainly comprises the steps:
1) in excel cell list, a line is inserted, and parameters information; Each cell in this inserting line marks this element lattice respective column respectively the need of output, and what need output does not need setting, and do not need to output in Verilog file, then the content of this element lattice is labeled as 1;
2) calculate the length value that in every column unit lattice, content is the longest, by reading the content in every column unit lattice successively, and calculating often arranges the character length that in all cells, content character length is the longest, obtains the content-length value that every column unit lattice are the longest;
3) output file is set, comprises file path and title that setting exports;
4) read line cell content, refer to from except the first step identify row except the first row read first row cell in content;
5) read column unit lattice content, and export according to parameters; Whether output in Verilog file according to the content that the content in the mark row of this element lattice column determines in this element lattice: if the content in mark row is 1, do not export, otherwise export; If export, after having exported this cell content, and then the longest content-length value exporting row corresponding to this element lattice deducts the space of the number of the value after this element lattice content-length value;
6) content of next column cell is read; Comprise the content reading next column cell in one's own profession, repeat the 5th step, until read all cells of one's own profession;
7) proceed to next line, read the cell of next line first row;
8) the 5th to the 7th step is repeated, until read the content of all cells except mark row;
9) output file set in the 3rd step is closed in.
Above-mentioned embodiment is only concrete case of the present invention; scope of patent protection of the present invention includes but not limited to above-mentioned embodiment; any claims according to the invention and any person of an ordinary skill in the technical field to its suitable change done or replacement, all should fall into scope of patent protection of the present invention.

Claims (6)

1. the output intent of an excel file data, it is characterized in that, it is verilog file layout that the programming language vba language utilizing excel to carry realizes the output of excel file layout, if select the row of excel cell list to export, first in setting unit table, a line is as mark row, and the numerical value in each cell in this mark row determines whether the row at this element lattice place export; Then calculate character length the longest in every column unit lattice, by all cells used in repeating query cell list, according to row repeating query, calculate the character length that in often arranging, cell is the longest.
2. the output intent of a kind of excel file data according to claim 1, it is characterized in that, if the curriculum offering in mark row cell is 1, then do not need to export respective column content, if the content in cell is other value or vacant, then need the content exporting respective column.
3. the output intent of a kind of excel file data according to claim 2, is characterized in that, the output intent of described excel file data also comprises and arranges output file, sets the file path and title that export.
4. the output intent of a kind of excel file data according to claim 3, is characterized in that, read line cell content, from except the first step the first row identified except row read content in the cell of first row.
5. the output intent of a kind of excel file data according to claim 4, is characterized in that, reads column unit lattice content, and exports according to parameters.
6. whether the output intent of a kind of excel file data according to claim 5, is characterized in that output in Verilog file according to the content that the content in the mark row of this element lattice column determines in this element lattice; If export, after having exported this cell content, the longer content-length value exporting row corresponding to this element lattice deducts the space of the number of the value after this element lattice content-length value.
CN201511005340.4A 2015-12-29 2015-12-29 A kind of output method of excel file datas Active CN105446950B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511005340.4A CN105446950B (en) 2015-12-29 2015-12-29 A kind of output method of excel file datas

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511005340.4A CN105446950B (en) 2015-12-29 2015-12-29 A kind of output method of excel file datas

Publications (2)

Publication Number Publication Date
CN105446950A true CN105446950A (en) 2016-03-30
CN105446950B CN105446950B (en) 2018-08-14

Family

ID=55557166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511005340.4A Active CN105446950B (en) 2015-12-29 2015-12-29 A kind of output method of excel file datas

Country Status (1)

Country Link
CN (1) CN105446950B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1321277A (en) * 1999-08-31 2001-11-07 清水勋 Database system
CN1373876A (en) * 1999-07-29 2002-10-09 特博数据实验室公司 Table format data presenting method, inserting method, deleting method, and updating method
CN1862527A (en) * 2006-06-09 2006-11-15 无锡永中科技有限公司 Method of line header and row header showing information in electronic table
US20110067001A1 (en) * 2009-09-16 2011-03-17 Viasat, Inc. Control/monitor automation for asics and programmable logic
CN103020089A (en) * 2011-09-27 2013-04-03 深圳市金蝶友商电子商务服务有限公司 Method and device for importing data in EXCEL file to database
CN103914438A (en) * 2012-12-30 2014-07-09 航天信息股份有限公司 Template and tag implementation based excel display and export method and system
CN104536772A (en) * 2015-01-30 2015-04-22 浪潮(北京)电子信息产业有限公司 Method and system for realizing expression conversion of cache coherence protocol
CN104714931A (en) * 2013-12-17 2015-06-17 国际商业机器公司 Method and system for selecting a structure to represent tabular information

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1373876A (en) * 1999-07-29 2002-10-09 特博数据实验室公司 Table format data presenting method, inserting method, deleting method, and updating method
CN1321277A (en) * 1999-08-31 2001-11-07 清水勋 Database system
CN1862527A (en) * 2006-06-09 2006-11-15 无锡永中科技有限公司 Method of line header and row header showing information in electronic table
US20110067001A1 (en) * 2009-09-16 2011-03-17 Viasat, Inc. Control/monitor automation for asics and programmable logic
CN103020089A (en) * 2011-09-27 2013-04-03 深圳市金蝶友商电子商务服务有限公司 Method and device for importing data in EXCEL file to database
CN103914438A (en) * 2012-12-30 2014-07-09 航天信息股份有限公司 Template and tag implementation based excel display and export method and system
CN104714931A (en) * 2013-12-17 2015-06-17 国际商业机器公司 Method and system for selecting a structure to represent tabular information
CN104536772A (en) * 2015-01-30 2015-04-22 浪潮(北京)电子信息产业有限公司 Method and system for realizing expression conversion of cache coherence protocol

Also Published As

Publication number Publication date
CN105446950B (en) 2018-08-14

Similar Documents

Publication Publication Date Title
CN104361139B (en) Data importing device and method
CN107590115A (en) A kind of Word report automatic generation methods and device
CN104317864B (en) A method of the information model automatic identification based on IEC61850 logical nodes
CN104715073A (en) Association rule mining system based on improved Apriori algorithm
CN102737108B (en) Method and device for processing flow diagram
CN103268362A (en) Auxiliary design method of virtual terminals on basis of general template and key character matching
CN103500139A (en) Communication software integration testing system and method
CN102012935A (en) Method for processing data among systems by using Excel
CN105279269B (en) A kind of support matrix freely associated SQL generation methods and system
CN103605663B (en) General database checking and metadata loading method
CN104063519A (en) BPA power grid data analyzing and managing method and system based on EXCEL
CN103473056A (en) Automatic generation method for telemetering configuration files
CN106327100A (en) Change list generation method and device
CN103699739A (en) Automatic designing and generating system for carrier rocket flight time sequence
CN104391731B (en) A kind of edit methods unrelated with data type based on C#
CN110795835A (en) Three-dimensional process model reverse generation method based on automatic synchronous modeling
CN104123376B (en) A kind of intelligent text collecting method and system based on row template
CN106127863B (en) A kind of refrigerator foaming die series design system and its method
CN103106313B (en) Roll consequent order reconstructing method
CN106815392B (en) Intelligent reading method for manufacturer terminal strip
CN103810365A (en) Automatic grading method based on hydroelectric simulation training system
CN107766519B (en) Method for visually configuring data structure
CN105912723A (en) Storage method of custom field
CN103744943A (en) Data inputting method applied to position evaluation system
CN105957153B (en) To the method and apparatus of the datum hole addition character marking on mold in PowerMill software

Legal Events

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