JP4090193B2 - CSV data converter for form data - Google Patents

CSV data converter for form data Download PDF

Info

Publication number
JP4090193B2
JP4090193B2 JP2000381429A JP2000381429A JP4090193B2 JP 4090193 B2 JP4090193 B2 JP 4090193B2 JP 2000381429 A JP2000381429 A JP 2000381429A JP 2000381429 A JP2000381429 A JP 2000381429A JP 4090193 B2 JP4090193 B2 JP 4090193B2
Authority
JP
Japan
Prior art keywords
data
file
format
csv
intermediate file
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.)
Expired - Fee Related
Application number
JP2000381429A
Other languages
Japanese (ja)
Other versions
JP2002183654A (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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2000381429A priority Critical patent/JP4090193B2/en
Publication of JP2002183654A publication Critical patent/JP2002183654A/en
Application granted granted Critical
Publication of JP4090193B2 publication Critical patent/JP4090193B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、データベースのデータを帳票スタイルで表示または印刷するものにおいて、その表示または印刷のためのデータを、CSV(カンマ・セパレーテッド・バリュー)形式のデータに変換して、他の用途に利用できるようにしたCSVデータ変換装置に関する。
【0002】
【従来の技術】
データベースに蓄積したデータを所定の帳票形式で表示したり、印刷したりする装置においては、あらかじめ帳票のフォーマットをフォーマットファイルに定義しておいて、適宜フォーマットを指定して表示または印刷することが行われる。フォーマットファイルには、どのデータをどの位置に置くかを指定する識別子が記述されている。帳票出力プログラムは、それぞれの識別子に該当するデータをデータベースから読み出して識別子の位置に埋め込んでいき、それを中間ファイルとして出力する。あとは、表示制御プログラムまたは印刷制御プログラムが、それぞれの表示装置や印刷装置に合わせて中間ファイルの内容を出力制御することで、帳票が表示または印刷されるものである。また、このフォーマットファイルを、ユーザが編集できるようにしたものもある。
【0003】
【発明が解決しようとする課題】
フォーマットファイルを編集することで、ユーザはさまざまな帳票スタイルにデータベースのデータを出力することができる。しかし、そのデータを加工したり、そのデータを別の用途に利用することはできない。表示または印刷するだけである。別の用途に利用するためにデータを取り出すことは、従来、容易ではなかった。
【0004】
【課題を解決するための手段】
本発明は、帳票に出力するデータを記録するデータベースと、帳票のフォーマットを記述したフォーマットファイルと、前記フォーマットファイルを参照して、その識別子に前記データベースから読み出したデータを埋め込んで帳票スタイルの中間ファイルを生成する帳票出力手段と、前記中間ファイルの内容を画面出力する表示制御手段と、前記中間ファイルの内容をプリンタに出力する印刷制御手段とを備え、前記フォーマットファイルにおいて、データを埋め込む識別子を複数個まとめてグループ化するグループ識別子をさらに記述しておき、前記フォーマットファイルを参照してそのグループ識別子に従って前記中間ファイルの帳票データをそれぞれのグループに分割し、そのグループを1行分のデータ列として中間ファイルのデータをCSV形式のデータ列に変換し、中間ファイルの内容をCSVファイルに出力する変換手段を備えることで、上記課題を解決するものである。
【0005】
【実施例】
図1は、実施例の帳票システムの構成を示すブロック図である。10は計算機本体であり、そこに、各種のデータを記録したデータベース11と、帳票のフォーマットを複数種類記録したフォーマットファイル12と、そのフォーマットに従ってデータベース11のデータを帳票スタイルに加工した中間データを一時的に記録する中間ファイル13と、帳票データを変換して得たCSV形式のデータを記録するCSVファイル14とがつながれている。また、計算機10には、帳票を表示するための表示装置7と、帳票を印刷するためのプリンタ8も接続されている。尚、ユーザがデータを入力するためのキーボードやマウスも接続されているが、ここでは図示省略している。
【0006】
計算機10はその内部に、ファイル入出力をはじめとする全体の制御を行う制御手段1と、データベース11のデータを読み出して、それをフォーマットファイル12のフォーマットに従って帳票スタイルの中間データに加工し、中間ファイル13に出力する帳票出力手段2と、その中間ファイル13の内容を表示装置7に表示出力する表示制御手段3と、中間ファイル13の内容をプリンタ8に印刷出力する印刷制御手段4とを備えている。つまり、帳票出力手段2が生成した中間ファイル13のデータは、表示用にも印刷用にも利用するものである。さらに、本実施例では、中間ファイル13のデータをCSV形式のデータに変換するCSV変換手段5を備えている。この変換手段5が中間ファイル13から加工したCSV形式のデータは、CSVファイル14に記録する。
【0007】
実施例では、複数種類のフォーマットファイル12を記録することができ、そのフォーマットはユーザが編集できるようになっている。フォーマットを編集するフォーマットエディタの表示画面20を図2に示す。このフォーマットエディタの機能は、制御手段1と表示制御手段3とによって実現される。同図に示すエディタの画面20において、22乃至25はデータの種別とそれを置く場所を示す識別子である。具体的には22は氏名、23は年齢、24は性別、そして25は住所に対応するデータを、データベース11から読み出してそこに出力することを指示するものである。識別子はボタン27を指示することで追加することができる。
【0008】
また、21はブロック識別子である。これは、その枠で囲んだ中の識別子、本例では22乃至25の4つの識別子を、1つのグループとして扱うことを指示するものである。ブロック識別子21は、ボタン28を指示してから、表示されている識別子22等を枠線で囲むことで設定する。ただし、このフォーマットに従って帳票を表示または印刷しても、ブロック識別子21は何の影響も与えない。その枠線も表示されることはない。ブロック識別子は、そのグループ内のデータを、CSV形式に変換したときに1行分のデータ列として扱うことを指示するためのものである。本例では、上で述べた22乃至25の4つのデータを、この順番で、1行分のCSVデータにして出力することを指示するものである。尚、図中26は識別子ではなく、文字を直接帳票に出力することを指示するものである。これはブロック識別子で囲まれていてもそのグループの1員とはならず、従って、CSVファイル14に出力されることもない。
【0009】
こうして設定され、保存されたフォーマットに従って、帳票出力手段2は、データベース11から読み出したデータを帳票スタイルに編集する。帳票出力手段2は、ユーザが指定したデータをデータベース11から読み出し、同じくユーザが指定したフォーマットをフォーマットファイル12から読み出してきて、その識別子に、対応するデータを埋め込んでいくのである。そして、完成した帳票スタイルの中間データを中間ファイル13に記録する。このとき、どのフォーマットを使ったかのフォーマット情報も中間ファイル13に記録する。
【0010】
この中間ファイル13の内容は、既に述べたように表示にも印刷にも利用できるものである。即ち、表示制御手段3が中間ファイル13の内容を読み出し、表示装置7に出力することで帳票を画面表示することができるし、同様に、印刷制御手段4が中間ファイル13の内容を読み出し、プリンタ8に出力することで帳票を印刷することができる。図2のフォーマットに従って帳票を印刷した例を図3に示す。氏名と年齢と性別及び住所が、識別子22乃至25に対応して印刷されている。また、年齢には、歳の文字もフォーマットに従って付加されている。これらは、ブロック識別子21でグループ化されたものであるが、見て分るように、帳票印刷時にはグループ化の効果は何もない。出力されるデータ種と印字位置はあくまで識別子22乃至25に支配される。尚、画面表示もこれと同様に表示されるものである。
【0011】
そして、本実施例では、表示や印刷に使われるこの中間ファイル13の内容から、CSV変換手段5がデータのみを抜き出し、CSV形式のデータ列に変換してファイルに出力するのである。即ち、ユーザからの指示に応じて、制御手段1がCSV変換手段5を起動するので、CSV変換手段5は、中間ファイル13から帳票スタイルのデータを読み出し、それに対応するフォーマット情報をフォーマットファイル12から読み出して、先ず、ブロック識別子でグループ化された識別子を認識する。図2の例では、識別子22乃至25がブロック識別子21にグループ化されている。そこで、それら識別子に対応するデータを抜き出し、CSV形式にしてCSVファイル14に出力する。その際、1つのグループ内のデータは、1行分のデータ列としてCSVファイル14に出力するのである。その例を図4に示す。それぞれのデータをダブルクォーテーションで囲んで、カンマで区切って1行に出力している。このように、フォーマットエディタの画面20では複数行に渡って置かれていた識別子も、ブロック識別子でグループ化されていれば、1行分のCSVとして扱われるものである。また、グループ化された識別子は、それが置かれた順にCSVのデータ列に変換されるものである。ただし、識別子26はCSVファイル14には出力されることはない。そして、こうして作られたCSVファイル14は、他のアプリケーションプログラム6で利用が可能である。
【0012】
【発明の効果】
本発明によれば、帳票の表示、印刷用に作られた中間データから、有意のデータだけを抽出してCSV形式のファイルに容易に取り出すことができるようになる。そして、そのデータを編集、加工して、さまざまな用途に利用可能になるものである。
【図面の簡単な説明】
【図1】実施例の構成を示すブロック図である。
【図2】実施例におけるフォーマットエディタの表示画面例を示す図である。
【図3】実施例における帳票の印刷例である。
【図4】実施例におけるCSVファイルの内容を示す図である。
【符号の説明】
1 制御手段 2 帳票出力手段 3 表示制御手段 4 印刷制御手段 5 CSV変換手段 7 表示装置 8 プリンタ 10 計算機11 データベース 12 フォーマットファイル 13 中間ファイル 14 CSVファイル
[0001]
BACKGROUND OF THE INVENTION
The present invention displays or prints database data in a form style, converts the data for display or printing into CSV (Comma Separated Value) format data, and uses it for other purposes. The present invention relates to a CSV data conversion apparatus that can be used.
[0002]
[Prior art]
In a device that displays or prints data stored in the database in a specified form format, the format of the form must be defined in the format file in advance, and the appropriate format can be specified for display or printing. Is called. In the format file, an identifier for specifying which data is to be placed in which position is described. The form output program reads data corresponding to each identifier from the database, embeds it in the identifier position, and outputs it as an intermediate file. After that, the display control program or the print control program controls the output of the contents of the intermediate file in accordance with each display device or printing device, so that the form is displayed or printed. Some of these format files can be edited by the user.
[0003]
[Problems to be solved by the invention]
By editing the format file, the user can output database data to various form styles. However, the data cannot be processed or used for another purpose. Just display or print. It has been difficult in the past to retrieve data for use in another application.
[0004]
[Means for Solving the Problems]
The present invention relates to a database for recording data to be output to a form, a format file describing the format of the form, and an intermediate file of the form style by referring to the format file and embedding the data read from the database in its identifier A form output means for generating a screen, a display control means for outputting the contents of the intermediate file to a screen, and a print control means for outputting the contents of the intermediate file to a printer, and a plurality of identifiers for embedding data in the format file. A group identifier to be grouped together is further described, the format file is referred to, the form data of the intermediate file is divided into groups according to the group identifier, and the group is used as a data string for one line. Intermediate file data Was converted into the data string of the CSV format, by providing a conversion means for outputting the contents of the intermediate file to a CSV file, it is to solve the above problems.
[0005]
【Example】
FIG. 1 is a block diagram illustrating a configuration of a form system according to an embodiment. Reference numeral 10 denotes a computer main body, in which a database 11 in which various data are recorded, a format file 12 in which a plurality of forms are recorded, and intermediate data obtained by processing the data in the database 11 into a form style according to the format are temporarily stored. The intermediate file 13 to be recorded is connected to the CSV file 14 to record the CSV data obtained by converting the form data. The computer 10 is also connected with a display device 7 for displaying a form and a printer 8 for printing the form. A keyboard and mouse for inputting data by the user are also connected, but are not shown here.
[0006]
The computer 10 internally reads the control unit 1 that performs overall control including file input / output and the data in the database 11, and processes the data into a form style intermediate data according to the format of the format file 12. A form output means 2 for outputting to the file 13, a display control means 3 for displaying and outputting the contents of the intermediate file 13 on the display device 7, and a print control means 4 for printing and outputting the contents of the intermediate file 13 to the printer 8. ing. That is, the data of the intermediate file 13 generated by the form output unit 2 is used for both display and printing. Furthermore, in this embodiment, a CSV conversion means 5 for converting the data of the intermediate file 13 into CSV format data is provided. The CSV data processed by the conversion means 5 from the intermediate file 13 is recorded in the CSV file 14.
[0007]
In the embodiment, a plurality of types of format files 12 can be recorded, and the formats can be edited by the user. A display screen 20 of the format editor for editing the format is shown in FIG. The function of the format editor is realized by the control means 1 and the display control means 3. In the editor screen 20 shown in the figure, reference numerals 22 to 25 denote identifiers indicating the type of data and the place where it is placed. Specifically, 22 is a name, 23 is age, 24 is gender, and 25 is an instruction to read out data corresponding to an address from the database 11 and output it there. The identifier can be added by indicating the button 27.
[0008]
Reference numeral 21 denotes a block identifier. This indicates that the identifiers enclosed in the frame, that is, four identifiers 22 to 25 in this example, are handled as one group. The block identifier 21 is set by surrounding the displayed identifier 22 and the like with a frame line after instructing the button 28. However, even if the form is displayed or printed according to this format, the block identifier 21 has no effect. The border is not displayed either. The block identifier is for instructing that data in the group is handled as a data string for one row when converted into the CSV format. In this example, it is instructed to output the four data 22 to 25 described above as CSV data for one row in this order. In the figure, reference numeral 26 denotes not an identifier but an instruction to directly output characters on a form. Even if it is surrounded by block identifiers, it is not a member of the group and is therefore not output to the CSV file 14.
[0009]
In accordance with the format set and saved in this way, the form output means 2 edits the data read from the database 11 into a form style. The form output means 2 reads the data designated by the user from the database 11, reads the format designated by the user from the format file 12, and embeds the corresponding data in the identifier. Then, the intermediate data of the completed form style is recorded in the intermediate file 13. At this time, format information indicating which format is used is also recorded in the intermediate file 13.
[0010]
The contents of the intermediate file 13 can be used for both display and printing as described above. That is, the display control means 3 can read the contents of the intermediate file 13 and output it to the display device 7 to display the form on the screen. Similarly, the print control means 4 reads the contents of the intermediate file 13 and By outputting to 8, the form can be printed. An example of printing a form according to the format of FIG. 2 is shown in FIG. The name, age, gender, and address are printed corresponding to the identifiers 22 to 25. In addition, the age letter is also added according to the format. These are grouped by the block identifier 21, but as you can see, there is no grouping effect when printing a form. The output data type and print position are governed by identifiers 22 to 25. The screen display is displayed in the same manner.
[0011]
In this embodiment, the CSV conversion means 5 extracts only the data from the contents of the intermediate file 13 used for display and printing, converts it into a CSV format data string, and outputs it to the file. That is, since the control unit 1 activates the CSV conversion unit 5 in response to an instruction from the user, the CSV conversion unit 5 reads the form style data from the intermediate file 13 and reads the corresponding format information from the format file 12. First, identifiers grouped by block identifiers are recognized. In the example of FIG. 2, identifiers 22 to 25 are grouped into block identifiers 21. Therefore, data corresponding to these identifiers is extracted, converted into CSV format, and output to the CSV file 14. At that time, the data in one group is output to the CSV file 14 as a data column for one row. An example is shown in FIG. Each data is enclosed in double quotes, separated by commas, and output on one line. Thus, identifiers placed over a plurality of lines on the screen 20 of the format editor are treated as CSV for one line if they are grouped by block identifiers. The grouped identifiers are converted into CSV data strings in the order in which they are placed. However, the identifier 26 is not output to the CSV file 14. The CSV file 14 created in this way can be used by other application programs 6.
[0012]
【The invention's effect】
According to the present invention, only significant data can be extracted from intermediate data created for displaying and printing a form, and easily extracted into a CSV file. Then, the data can be edited and processed to be used for various purposes.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an embodiment.
FIG. 2 is a diagram illustrating a display screen example of a format editor in the embodiment.
FIG. 3 is a print example of a form in the embodiment.
FIG. 4 is a diagram showing the contents of a CSV file in the embodiment.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Control means 2 Form output means 3 Display control means 4 Print control means 5 CSV conversion means 7 Display apparatus 8 Printer 10 Computer 11 Database 12 Format file 13 Intermediate file 14 CSV file

Claims (1)

帳票に出力するデータを記録するデータベースと、帳票のフォーマットを記述したフォーマットファイルと、前記フォーマットファイルを参照して、その識別子に前記データベースから読み出したデータを埋め込んで帳票スタイルの中間ファイルを生成する帳票出力手段と、前記中間ファイルの内容を画面出力する表示制御手段と、前記中間ファイルの内容をプリンタに出力する印刷制御手段とを備え、前記フォーマットファイルにおいて、データを埋め込む識別子を複数個まとめてグループ化するグループ識別子をさらに記述しておき、前記フォーマットファイルを参照してそのグループ識別子に従って前記中間ファイルの帳票データをそれぞれのグループに分割し、そのグループを1行分のデータ列として中間ファイルのデータをCSV形式のデータ列に変換し、中間ファイルの内容をCSVファイルに出力する変換手段を備えた帳票データのCSVデータ変換装置。  A database that records data to be output to a form, a format file that describes the format of the form, and a form that refers to the format file and embeds the data read from the database into its identifier to generate a form-style intermediate file An output unit; a display control unit that outputs the contents of the intermediate file to a screen; and a print control unit that outputs the contents of the intermediate file to a printer. The group identifier to be converted is further described, the form file of the intermediate file is divided into each group according to the group identifier with reference to the format file, and the data of the intermediate file is set as a data column for one line. CSV Into a data sequence of the formula, CSV data conversion apparatus of the form data with the conversion means for outputting the contents of the intermediate file to a CSV file.
JP2000381429A 2000-12-15 2000-12-15 CSV data converter for form data Expired - Fee Related JP4090193B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000381429A JP4090193B2 (en) 2000-12-15 2000-12-15 CSV data converter for form data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000381429A JP4090193B2 (en) 2000-12-15 2000-12-15 CSV data converter for form data

Publications (2)

Publication Number Publication Date
JP2002183654A JP2002183654A (en) 2002-06-28
JP4090193B2 true JP4090193B2 (en) 2008-05-28

Family

ID=18849425

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000381429A Expired - Fee Related JP4090193B2 (en) 2000-12-15 2000-12-15 CSV data converter for form data

Country Status (1)

Country Link
JP (1) JP4090193B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4495782B2 (en) * 2004-02-25 2010-07-07 株式会社野村総合研究所 Data integration management system and data integration management program
JP4546130B2 (en) * 2004-04-09 2010-09-15 株式会社ネクステージ Sealed document creation management system and method suitable for character information extraction for database construction
JP2021009528A (en) * 2019-06-30 2021-01-28 大 益滿 Database and information processing system

Also Published As

Publication number Publication date
JP2002183654A (en) 2002-06-28

Similar Documents

Publication Publication Date Title
EP0743614B1 (en) Information processor having two-dimensional bar code processing function
JP4090193B2 (en) CSV data converter for form data
JPS6019012B2 (en) Message output editing method
JPH0575835A (en) Character data padding printing system to image data
JPH0438005B2 (en)
JP2001301265A (en) Method and device for setting print format
JP3451289B2 (en) Table output device
JP3080891B2 (en) Form processing device
JPS6330931A (en) Document format stipulating system
JP2614339B2 (en) Form output editing device
JP2004334420A (en) Form generation method and form output device
JP3083435B2 (en) Slip file forming device
JPS6113616B2 (en)
JPH0667955A (en) Data file editing system
JPH1115853A (en) Device for registering cosmetic record
JP3219757B2 (en) Skeleton generation method of form output program
JPH1196384A (en) Measurement image document creating device and storage medium
JPH0816436A (en) File dump output supporting method
JP2004054366A (en) Variable form data creation system
JPS63247071A (en) Printing of text data
JPH10207672A (en) Data printing processor
JPS63724A (en) Editing and printing system
JPH06161841A (en) Record converting device
JPH0683825A (en) Automatic document layout
JPH02304674A (en) Business form generating method

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20051226

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071031

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071120

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080109

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080129

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080226

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110307

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110307

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130307

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130307

Year of fee payment: 5

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130307

Year of fee payment: 5

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130307

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140307

Year of fee payment: 6

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees