[go: up one dir, main page]

JP4068008B2 - Spreadsheet software linkage processing apparatus and method - Google Patents

Spreadsheet software linkage processing apparatus and method Download PDF

Info

Publication number
JP4068008B2
JP4068008B2 JP2003137951A JP2003137951A JP4068008B2 JP 4068008 B2 JP4068008 B2 JP 4068008B2 JP 2003137951 A JP2003137951 A JP 2003137951A JP 2003137951 A JP2003137951 A JP 2003137951A JP 4068008 B2 JP4068008 B2 JP 4068008B2
Authority
JP
Japan
Prior art keywords
worksheet
data
information
cell
spreadsheet software
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 - Lifetime
Application number
JP2003137951A
Other languages
Japanese (ja)
Other versions
JP2003346075A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2003137951A priority Critical patent/JP4068008B2/en
Publication of JP2003346075A publication Critical patent/JP2003346075A/en
Application granted granted Critical
Publication of JP4068008B2 publication Critical patent/JP4068008B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Description

【0001】
【産業上の利用分野】
本発明は、パーソナルコンピュータやワークステーション(以下、PC/WSと記す)等の端末計算機およびホスト計算機を利用して業務処理を行うデータ処理システムに係り、PC/WSで動作する表計算ソフトウェアと、ホスト計算機上のプログラムまたはデータとのオンライン連携処理を可能とした表計算ソフトウェア連携処理に関する。
【0002】
【従来の技術】
近年、業務処理等を行うために、PC/WS上で動作する表計算ソフトウェアを導入するユーザが増えている。これに伴い、PC/WS上の表計算ソフトウェアと、回線を介してPC/WSに接続されたホスト計算機上の処理との連携により、業務処理等を効率化することが望まれている。
【0003】
従来の表計算ソフトウェア連携処理装置の一例が、先願の「表計算ソフトウェア連携処理装置」(特開平5−73590)に示されている。この表計算ソフトウェア連携処理装置においては、まず、表計算ソフトウェアが作成する表形式データの定義情報である原型ワークシートが、PC/WSからホスト計算機に送信される。ホスト計算機は、受信した原型ワークシートをもとに、表中のレコード領域を定義するレコード領域原始文と、配信ワークシート作成に必要な体裁情報であるワークシート・フォーマット定義体とを作成する。そして、ホスト計算機上でデータベース処理等を行う応用プログラムに、レコード領域原始文を組み込んで、その応用プログラムを実行する。応用プログラムは、具体的なデータ処理の結果をレコード領域原始文により指定されたレコードとして出力する。次に、ホスト計算機はワークシート・フォーマット定義体を参照しながら、応用プログラムが出力するレコードの内容を表に埋め込んで、表形式の配信ワークシートを作成する。配信ワークシートは、PC/WSから送られた原型ワークシートをもとに作成されているので、PC/WS上の表計算ソフトウェアが処理可能な形式になっている。作成された配信ワークシートは、ホスト計算機からPC/WSに送信され、表計算ソフトウェアの処理対象として利用される。表計算ソフトウェアは、配信ワークシートをもとに表データの再編成や表示処理などを行う。
【0004】
このように、従来の表計算ソフトウェア連携処理装置によれば、ホスト計算機からPC/WSに向けて、ホスト上のデータが埋め込まれた配信ワークシートを自動的に配信することができ、PC/WSへのデータの入力処理が効率化される。
【0005】
【発明が解決しようとする課題】
しかしながら、従来の表計算ソフトウェア連携処理装置には次のような問題がある。
【0006】
従来の表計算ソフトウェア連携処理装置は、ホスト計算機からPC/WSにワークシートを配信することはできたが、PC/WSの表計算ソフトウェアを使用してデータ入力したワークシートを、ホスト計算機で動作する応用プログラムで取り込んでホスト計算機のデータとして利用するためには、表計算ソフトウェアの特性を意識した特別な処理を応用プログラムに組み込む必要がある。しかし、ワークシート・フォーマット定義体はユーザには公開されていないので、その内容を利用することはできない。このため、表計算ソフトウェアを使用したホスト計算機へのデータ入力に関して、ユーザは応用プログラムに複雑な処理を組み込む作業を行わなければならない。
【0007】
また、PC/WSへのワークシートの配信に関しても、ホスト計算機上で動作するワークシート配信用の応用プログラムを新たに作成する必要がある。したがって、ホスト計算機からPC/WSへのデータ入力のためにも、ユーザは新たな応用プログラムを作成しなければならない。
【0008】
本発明は、PC/WS等の端末計算機上の表計算ソフトウェアとホスト計算機上のプログラムまたはデータとの連携処理を、容易に行うことが可能な表計算ソフトウェア連携処理装置とその方法を提供することを目的とする。
【0009】
【課題を解決するための手段】
図1は、本発明の表計算ソフトウェア連携処理装置をホスト計算機1内に備える情報処理システムの原理図である。図1の情報処理システムは、オンライン回線により接続されたホスト計算機1と端末計算機21、および端末計算機21用の表示装置25から構成される。端末計算機21は送信手段22、受信手段23、表計算ソフトウェア24を備える。また、ホスト計算機1内の表計算ソフトウェア連携処理装置は、通信処理部2、レコード領域原始文生成手段4、ワークシート・フォーマット定義体生成手段5、応用プログラム実行手段7、データ入力用ワークシート解析手段9、帳票印刷データ作成手段12、および配信ワークシート作成手段14を備える。
【0010】
図1において、端末計算機21上の表計算ソフトウェア24は表計算等の処理を行い、表示装置25に表を表示する。また、送信手段22は、表計算ソフトウェア24が作成した原型ワークシート3およびデータ入力用ワークシート11を、上記オンライン回線を介して通信処理部2に送信する。
【0011】
通信処理部2は、表計算ソフトウェア24が生成した原型ワークシート3およびデータ入力用ワークシート11を端末計算機21から受信する。レコード領域原始文生成手段4は、原型ワークシート3を構成する表の個々のデータに関する定義情報を解析して、レコード領域の配列データを含むレコード領域原始文を生成する。
【0012】
ワークシート・フォーマット定義体生成手段5は、原型ワークシート3から、ワークシートの体裁に関する定義情報を含むワークシート・フォーマット定義体10を生成する。
【0013】
応用プログラム実行手段7は、生成されたレコード領域原始文が組み込まれ、そのレコード領域原始文により指定されるレコード領域に通知された入力データを参照して処理を行う応用プログラムを実行する。
【0014】
データ入力用ワークシート解析手段9は、ワークシート・フォーマット定義体10を参照しながら、データ入力用ワークシート11を解析して入力データを生成し、その入力データを上記応用プログラムのレコード領域に通知する。
【0015】
また、応用プログラム実行手段7は、表計算ソフトウェア24がデータとして使用可能な帳票を印刷するために用いられる帳票印刷データ13の出力を指示する応用プログラムを実行する。
【0016】
帳票印刷データ作成手段12は、その応用プログラムからの指示を受けて、帳票印刷データ13を作成し、配信ワークシート作成手段14は、上記帳票の体裁に関する帳票体裁定義情報16を参照して、作成された帳票印刷データ13から配信ワークシート15を作成する。
【0017】
通信処理部2は、配信ワークシート15を端末計算機21に送信する。
一方、端末計算機21の受信手段23は、通信処理部2から上記オンライン回線を介して配信ワークシート15を受信し、表計算ソフトウェア24は配信ワークシート15に含まれるデータを利用して処理を行う。
【0018】
【作用】
端末計算機21とホスト計算機1は、原型ワークシート3、データ入力用ワークシート11、配信ワークシート15等のワークシート情報をやりとりして、表計算に関する連携処理を行う。
【0019】
まず、ホスト計算機1では、端末計算機21上の表計算ソフトウェア24を使用して作成した原型ワークシート3から、レコード領域原始文生成手段4によりレコード領域原始文6が自動的に生成され、応用プログラムがそのレコード領域原始文6を組み込むことができるようになる。また、同じ原型ワークシート3から、ワークシート・フォーマット定義体生成手段5によりワークシート・フォーマット定義体10が生成され、データ入力用ワークシート解析手段9はそれを用いてデータ入力用ワークシート11を解析することができる。
【0020】
レコード領域原始文6とワークシート・フォーマット定義体10は、ともに同じ原型ワークシート3から生成されており、データ項目の属性について共通の情報を持っている。応用プログラム実行手段7は、データ入力用ワークシート解析手段9によりレコード領域原始文6の形式に変換された入力データを受け取り、その入力データを用いた演算等の処理を応用プログラムに行わせる。
【0021】
これにより、表計算ソフトウェア24が作成したデータが自動的に応用プログラムに入力され、表計算ソフトウェア24が持つ豊富な操作性を、ホスト計算機1に対するデータの入力処理に活用できるようになる。また、従来の表計算ソフトウェア連携処理装置に比べて、より容易にホスト計算機へデータを入力することが可能になる。
【0022】
また、応用プログラムにより帳票印刷データ13を出力する指示が出されると、帳票印刷データ作成手段12は、帳票体裁定義情報16により定義される体裁に合わせて、帳票印刷データ13を作成する。帳票印刷データ13は、従来、ホスト計算機1において帳票を印刷するために用いられていたデータであり、印刷された帳票は、表計算ソフトウェア24が作成する表と近似した形式を持つ。帳票印刷データ13から、配信ワークシート作成手段14により、表計算ソフトウェア24が処理可能な形の配信ワークシート15が作成される。このとき、帳票体裁定義情報16に含まれるデータ項目情報が参照される。
【0023】
作成された配信ワークシート15は、通信処理部2により端末計算機21に送信され、表計算ソフトウェア24は、それに含まれるデータを利用して表計算等の処理を行う。
【0024】
これにより、ホスト計算機1で出力される帳票の内容が自動的に端末計算機21に入力され、表計算ソフトウェア24の処理に活用できるようになる。また、従来の表計算ソフトウェア連携処理装置に比べて、新たな配信用のプログラムを作成する必要が無く、より容易にデータを配信することが可能になる。
【0025】
【実施例】
以下、図面を参照しながら、本発明の実施例について詳細に説明する。
図2は、本発明の第1の実施例の表計算ソフトウェア連携処理装置の構成図である。図2の表計算ソフトウェア連携処理装置は図1のホスト計算機1内に設けられ、レコード領域原始文生成部31、ワークシート・フォーマット定義体生成部32、およびデータ入力用ワークシート解析部33を備える。レコード領域原始文生成部31、ワークシート・フォーマット定義体生成部32、およびデータ入力用ワークシート解析部33は、ホスト計算機1内の図示されないCPU(中央処理装置)の演算処理機能により実現される。
【0026】
図2において、原型ワークシート3は、端末計算機21の表計算ソフトウェア24により作成された後、ホスト計算機1へ送信されて通信処理部2により受信される。この例では、原型ワークシート3は3つの列A、B、Cからなる表を記述しており、1行目から6行目までが表中のセルの配列を表し、7行目から10行目までがレコード・データ項目記述部となっている。
【0027】
1行目の「1月の売上高」は表全体に対する注釈を表し、2行目の「品名」、「数量」、「売上」は、それぞれA、B、C各列のデータ項目に対応する見出し語を表す。3行目の「!A」、「!B」、「!C」は、それぞれ「品名」、「数量」、「売上」に対応する変数名を表す。ホスト計算機1内でのデータ処理の結果はこれらの変数に格納される。4、5行目についても3行目と同様である。6行目の「合計」は3〜5行目の各品名についての合計を表す見出し語である。また、「@SUM(B3:B5)」は3〜5行目の変数!Bの和を求める関数を表し、「@SUM(C3:C5)」は3〜5行目の変数!Cの和を求める関数を表す。
【0028】
7行目の「RECORD NAME=REC001」はレコード定義を表し、8〜9行目は各データ項目の記述を表す。例えば、8行目の「A DATA PIC=(N,8)‥‥」は変数!Aのデータ型がN(日本語)で、長さが8文字であることを表し、9行目の「B DATA PIC=(9,6)‥‥」は変数!Bのデータ型が9(数字)で、長さが6文字(6桁)であることを表す。10行目についても9行目と同様である。
【0029】
レコード領域原始文生成部31は、原型ワークシート3のレコード・データ項目記述部を解析してレコード領域原始文6を生成する。本実施例では、COBOL言語で記述された応用プログラム34が、COPY句によってプログラム中に組み込むことができるCOPYライブラリ35として、レコード領域原始文6を生成している。
【0030】
また、ワークシート・フォーマット定義体生成部32は、原型ワークシート3を参照して、セル情報とデータ項目情報からなるワークシート・フォーマット定義体10を生成する。本実施例では、ワークシート・フォーマット定義体10をメンバに持つフォーマットライブラリ36として生成している。
【0031】
応用プログラム34は、COPY句「COPY REC001」によって、レコード領域原始文6をプログラム中に組み込み、OPEN命令、READ命令、CLOSE命令を発行する。OPEN命令により、レコード領域原始文6が指定するレコードをその構成要素として持つ表示ファイルを開き、READ命令によりその表示ファイルの内容を読み込み、CLOSE命令により表示ファイルを閉じる。ここで、表示ファイルとは、ディスプレイやプリンタ等をアクセスするための仮想的なファイルを指し、本実施例においてはデータ入力用ワークシート11の内容を含んでいる。
【0032】
データ入力用ワークシート11は、原型ワークシート3の表中の変数や関数値を具体的な入力データで置き換えたワークシートであり、端末計算機21上で表計算ソフトウェアにより生成された後、ホスト計算機1へ送信される。データ入力用ワークシート解析部33は、ワークシート・フォーマット定義体10を参照して、受け取ったデータ入力用ワークシート11から入力データを抽出し、レコード領域原始文6を組み込んだ応用プログラム34に、レコード領域原始文6と同じ形式で入力データを通知する。このとき、入力データはレコード領域原始文6の形式に変換されており、応用プログラム34は、端末計算機21から入力された個々のデータを使用して処理を行うことができる。
【0033】
図3は、図2の原型ワークシート3に対応するワークシート・フォーマット定義体10の例を示している。図3のワークシート・フォーマット定義体10は、セル情報41とデータ項目情報42から構成される。セル情報41には、原型ワークシート3の表中のセルの位置を表すセル番地、セルの種類を表すセル種別、セルの内容である具体的な文字列/変数名/関数、およびその他のセル属性が記述される。また、データ項目情報42には、データ項目に対応する変数名、変数の型を表すデータ型、変数の長さを表す項目長、対応するレコード内のオフセット、および同じ変数の繰り返し数が記述される。
【0034】
図4は、図2の原型ワークシート3に対応するデータ入力用ワークシート11の例を示している。図4のデータ入力用ワークシート11は、図2の原型ワークシート3の表において、3〜5行目の変数「!A」、「!B」、「!C」と6行目の関数「@SUM(B3:B5)」、「@SUM(C3:C5)」を、それぞれ具体的なデータに置き換えた形になっている。
【0035】
次に、図5および図6を参照しながら、レコード領域原始文生成部31によるレコード領域原始文生成処理とワークシート・フォーマット定義体生成部32によるワークシート・フォーマット定義体生成処理について説明する。
【0036】
図5は、レコード領域原始文生成処理のフローチャートである。図5のレコード領域原始文生成処理により、例えば図2の原型ワークシート3からレコード領域原始文6が生成される。図5において処理が開始されると、レコード領域原始文生成部31は、まず原型ワークシート3のレコード・データ項目記述部からレコードまたはデータ項目に関する定義情報を取り出す(ステップS1)。定義情報がなければ、レコード・データ項目記述部が終了したと判断し(ステップS2、Yes)、処理を終了する。次に、取り出した定義情報がレコード定義に相当するかどうかを判定し(ステップS3)、レコード定義であればレコード文生成処理を行う(ステップS5)。そして、ステップS1以降の処理を繰り返す。
【0037】
例えば、図2の原型ワークシート3の7行目の定義情報はレコード定義に相当するので、レベル情報として「01」を設定し、指定されたレコード名を設定する(ステップS5)。これにより、図2のレコード領域原始文6の1行目の「01 REC001」が生成される。
【0038】
ステップS3において、定義情報がデータ項目に関するものである場合は、データ文生成処理を行う(ステップS4)。データ文生成処理においては、レベル情報を設定し、データ項目名、データ項目属性、およびデータ項目長を得て、それらを設定する。そして、ステップS1以降の処理を繰り返す。
【0039】
例えば、図2の原型ワークシート3の8行目の定義情報は最初のデータ項目定義に相当するので、レベル情報「02」を設定し、データ項目の集団項目名「REC001−DATA」を設定する。この集団項目名は、より低いレベル「10」に設定されるデータ項目の配列を識別するために付加される。次に、レベル情報「10」とデータ項目名「A」を設定する。また、データ項目属性とデータ項目長を合わせて、「OCCURS 3」、「PIC N(8)」のように配列データとして設定する。ここで、N(8)はデータ項目長8の大きさを持つ日本語の文字列を表し、「OCCURS 3」は同じ型の文字列が3回繰り返されることを表す。9、10行目の定義情報についても同様の処理を行って、レベル「10」のデータ文を生成する。
【0040】
図6は、ワークシート・フォーマット定義体生成処理のフローチャートである。図6のワークシート・フォーマット定義体生成処理により、例えば図2の原型ワークシート3から図3のワークシート・フォーマット定義体10が生成される。図6において処理が開始されると、ワークシート・フォーマット定義体生成部32は、まず制御用の変数m、nにそれぞれ1を代入し(ステップS11、S12)、原型ワークシート3のm行n列のセル情報を取り出す(ステップS13)。次に、取り出したセル情報が変数セルか固定値セルかを判定し(ステップS14)、変数セルの場合は変数セル変換処理を行い(ステップS15)、固定値セルの場合は固定値セル変換処理を行う(ステップS16)。尚、関数が設定されたセルについては、これを固定値セルとして処理する。
【0041】
次に、m行のすべての列のセル情報を取り出したかどうかを判定し(ステップS17)、セル情報の取り出しが終了していない場合はnをn+1とおいて(ステップS18)、ステップS13以降の処理を繰り返す。ステップS17ですべての列のセル情報の取り出しが終了した場合は、次にすべての行のセル情報を取り出したかどうかを判定する(ステップS19)。セル情報の取り出しが終了していない場合はmをm+1、nを1とおいて(ステップS20、S21)、ステップS13以降の処理を繰り返す。そして、ステップS19ですべての行のセル情報の取り出しを終了したと判定したとき、処理を終了する。
【0042】
ステップS15の変数セル変換処理においては、セル情報から属性情報を抽出し、セルとデータ項目を対応付けて、ワークシート・フォーマット定義体情報に変換する。例えば、図2の3行1列(3行A列)のセル情報は変数「!A」を表すので、図3のワークシート・フォーマット定義体10におけるセル情報41に、対応するセル番地「A3」、セル種別「変数」、変数名「A」を設定し、ポインタを用いてデータ項目情報42内の変数名「A」と対応付ける。データ項目情報42内の変数名「A」の欄には、データ型「N」、項目長「8」、レコード内オフセット「0」、繰り返し数「3」が設定される。セル情報41の変数名の欄の「(配列の1番目)」は、3回繰り返される同名の変数のうちの1番目であることを表している。他の変数セルについても同様の処理が行われる。
【0043】
また、ステップS16の固定値セル変換処理においては、セル情報から属性情報および文字列情報を抽出し、ワークシート・フォーマット定義体情報に変換する。例えば、図2の1行1列(1行A列)のセル情報は固定値「1月の売上高」を表すので、セル情報41に、対応するセル番地「A1」、セル種別「固定値」、文字列「1月の売上高」を設定する。固定値セルの場合は、変数セルの場合と異なり、データ項目情報42との対応付けを行う必要はない。他の固定値セルについても同様の処理が行われる。
【0044】
このような処理を繰り返すことにより、最終的に図3に示すようなワークシート・フォーマット定義体10が生成される。
COPY句によりレコード領域原始文6を組込んだ応用プログラム34は、READ命令により表示ファイルからデータ入力用ワークシート11を読み込んで、その内容をデータ入力用ワークシート解析部33に解析させる。次に、図7および図8を参照しながら、READ命令の処理とデータ入力用ワークシート解析部33によるデータ入力用ワークシート解析処理について説明する。
【0045】
図7は、READ命令の処理フローチャートである。図7において処理が開始されると、応用プログラム34は、まず表示ファイルのパラメタチェックを行い(ステップS31)、端末計算機21から受信したデータ入力用ワークシート11を含むことがわかると、これをメモリ内に取り込む(ステップS32)。そして、データ入力用ワークシート解析部33を呼出して、取り込んだデータ入力用ワークシート11の解析を依頼し、入力レコードを生成する(ステップS33)。次に、復帰コードを設定して(ステップS34)、応用プログラム34の次の命令の処理に復帰する。
【0046】
図8は、図7のステップS33で呼出されたデータ入力用ワークシート解析部33によるデータ入力用ワークシート解析処理のフローチャートである。図8において処理が開始されると、データ入力用ワークシート解析部33は、まず制御用の変数m、nにそれぞれ1を代入し(ステップS41、S42)、データ入力用ワークシート11のm行n列のセル情報を取り出す(ステップS43)。次に、ワークシート・フォーマット定義体10を参照して、取り出したセル情報が変数セルか固定値セルかを判定する(ステップS44)。このとき、関数が設定されたセルは固定値セルに含められる。
【0047】
例えば、図4のデータ入力用ワークシート11の1行1列(1行A列)のセルのセル番地はA1であり、図3のセル情報41のセル番地A1に対応するセル種別は固定値であるので、このセルは固定値セルであることが分かる。同様にして、データ入力用ワークシート11の3行1列(3行A列)のセルのセル番地はA3であり、セル情報41のセル番地A3に対応するセル種別は変数であるので、このセルは変数セルであることが分かる。また、6行2列(6行B列)のセルのセル番地はB6であり、対応するセル種別は関数であるので、このセルは固定値セルとして扱う。
【0048】
固定値セルの場合は、その文字列情報は既にワークシート・フォーマット定義体10に設定されているので、それを読み取る必要はない。そこで、m行のすべての列のセル情報を取り出したかどうかを判定し(ステップS46)、セル情報の取り出しが終了していない場合はnをn+1とおいて(ステップS47)、ステップS43以降の処理を繰り返す。ステップS46ですべての列のセル情報の取り出しが終了した場合は、次にすべての行のセル情報を取り出したかどうかを判定する(ステップS48)。セル情報の取り出しが終了していない場合はmをm+1、nを1とおいて(ステップS49、S50)、ステップS43以降の処理を繰り返す。そして、ステップS48ですべての行のセル情報の取り出しを終了したと判定したとき、処理を終了する。
【0049】
ステップS44で変数セルの場合は、その情報を読み取るために入力データ変換処理を行ってから(ステップS45)、ステップS46以降の処理を行う。入力データ変換処理においては、変数セルから文字列情報を抽出し、ワークシート・フォーマット定義体10を参照して、そのセル番地の変数セルに対応するデータ項目情報を得る。そして、変数セルから抽出した文字列をデータ項目情報により指定されるデータ型に合わせて変換し、レコードとして組み立てる。
【0050】
例えば、データ入力用ワークシート11の3行1列(3行A列)のセルは変数セルであるので、その文字列「日本酒」を抽出する。次に、ワークシート・フォーマット定義体10のセル情報41内のセル番地A3に格納されたポインタを使用してデータ項目情報42にアクセスし、対応する変数名Aのデータ型、項目長、レコード内オフセットを得る。そして、これらのデータ項目情報に合わせて文字列「日本酒」を変換し、入力レコードを生成する。また、データ入力用ワークシート11の3行2列(3行B列)のセルも変数セルであるので、その文字列「100」を抽出する。次に、セル情報41内のセル番地B3に格納されたポインタを使用してデータ項目情報42にアクセスし、対応する変数名Bの情報を得る。そして、そのデータ項目情報に合わせて文字列「100」を変換し、レコード領域原始文6の形式に合った入力レコードを生成する。他の変数セルについても同様の処理が行われる。
【0051】
こうして、データ入力用ワークシート11に含まれるすべての変数セルから文字列を抽出すると、データ入力用ワークシート解析部33は、生成した入力レコードを応用プログラム34に通知する。応用プログラム34は、組込まれているレコード領域原始文6を用いて入力レコードを読み取り、演算等の処理を行う。
【0052】
第1の実施例によれば、データ入力用ワークシート解析部33がワークシート・フォーマット定義体10を利用して、データ入力用ワークシート11から入力レコードを自動的に抽出するので、表計算ソフトウェア24から応用プログラム34へのデータ入力が容易になる。
【0053】
尚、第1の実施例において、応用プログラム34はCOBOL言語で記述されているが、本発明は他の言語で記述された応用プログラムに対しても同様に適用することができる。また、図2に示された原型ワークシート3は一例に過ぎず、他の任意の表データに対応することが可能である。その場合、レコード領域原始文6とワークシート・フォーマット定義体10も、原型ワークシート3に対応したものが生成される。
【0054】
次に、図9から図12までを参照しながら、本発明の第2の実施例について説明する。
図9は、本発明の第2の実施例の表計算ソフトウェア連携処理装置の構成図である。図9の表計算ソフトウェア連携処理装置は図1のホスト計算機1内に設けられ、配信ワークシート作成部53を備える。配信ワークシート作成部53は、ホスト計算機1内のCPUの演算処理機能により実現される。また、図9の帳票印刷データ印刷装置51は、例えばホスト計算機1に接続されたプリンタ等の印刷機器である。
【0055】
図9において、帳票印刷データ13は、応用プログラムからの出力指示を受けた、ホスト計算機1の帳票印刷データ作成手段12により作成される帳票印刷用のデータである。例えば、これまでは帳票印刷データ印刷装置51により帳票印刷データ13を元にして、帳票52が印刷されていた。帳票52は、表計算ソフトウェア24が作成する表に適合した体裁を持っており、そのデータを端末計算機21に再入力して処理に利用することもできる。この例では、帳票52は商品の受注一覧を表し、受注番号、商品名、数量、単価、小計のカラムを有する。例えば、受注番号12000の商品XXXXXXの受注数量は100であり、その単価は¥5,000、小計は¥500,000である。また、すべての受注商品の合計額は¥800,000となっている。
【0056】
配信ワークシート作成部53は、帳票体裁定義情報16を参照して、帳票印刷データ13から配信ワークシート15を作成する。帳票体裁定義情報16は、帳票印刷データ作成手段12が帳票印刷データ13を作成する時に参照する定義情報であり、フィールド情報54とデータ項目情報55からなる。図9において、配信ワークシート15は、縦31行、横6列(カラム)から成るワークシートとして作成されている。配信ワークシート15上の各項目は帳票52に印刷される場合と近似した位置に配置されている。
【0057】
図10は、図9の帳票52に対応するフィールド情報54を示しており、図11は、図9の帳票52に対応するデータ項目情報55を示している。フィールド情報54は、帳票52の表の各フィールドの位置、固定フィールドまたは可変フィールドの種別、文字列/データ項目名、文字サイズを格納しており、データ項目情報55は、可変フィールドのデータ項目名についての属性を格納している。図10のフィールド情報54において、各行位置は図9の配信ワークシート15の同じ番号の行にそれぞれ対応し、各列位値1、11、23、31、41、49は、配信ワークシート15の列A、B、C、D、E、Fにそれぞれ対応している。
【0058】
データ項目情報55に格納されるデータ項目の属性としては、データ型、項目長、レコード内オフセット、繰り返し数、数値編集属性等がある。これらのうち、データ型、項目長、レコード内オフセット、および繰り返し数については、図3のデータ項目情報42と同様の意味を持つ。フィールド情報54の各可変フィールドの情報は、あらかじめポインタを用いてデータ項目情報55内の対応するデータ項目の情報と関係付けられている。例えば、フィールド情報54の3行31列のフィールド情報は「SHAMEI」というデータ項目を持つので、データ項目情報55内の「SHAMEI」の情報を指すポインタを格納している。
【0059】
図12は、配信ワークシート作成部53による配信ワークシート作成処理のフローチャートである。図12の配信ワークシート作成処理により、例えば図9の帳票印刷データ13から配信ワークシート15が作成される。図12において処理が開始されると、配信ワークシート作成部53は、まず帳票体裁定義情報16から帳票52内の先頭の項目に対応するフィールド情報を取り出し(ステップS51)、帳票印刷データ13から先頭行の印刷内容を取り出す(ステップS52)。次に、取り出したフィールド情報(項目情報)の行位置が、取り出した印刷内容の行位置に一致するかどうかを判定する(ステップS53)。両者が一致しない場合は、帳票印刷データ13から次の行の印刷内容を取り出し(ステップS54)、再びステップS53の判定を行う。
【0060】
ステップS53で2つの行位置が一致すれば、セルの生成処理を行い(ステップS55)、フィールド情報54の最終情報(最終項目)に達したかどうかを判定する(ステップS56)。最終項目に達していなければ、帳票体裁定義情報16から帳票52内の次の項目に対応するフィールド情報を取り出し(ステップS57)、ステップS53以降の処理を繰り返す。そして、ステップS56で最終項目に達したと判定すると、処理を終了する。
【0061】
ステップS55のセルの生成処理においては、取り出した項目情報の列位置および対応するデータ項目の項目長を元にして、印刷内容から対応する文字列を抽出する。そして、項目情報の行位置、列位置、データ項目の項目長、抽出した文字列から1つのセルを生成する。この処理を帳票印刷データ13のすべての印刷内容について行えば、配信ワークシート15が生成される。
【0062】
例えば、図10のフィールド情報54の3行31列において、フィールド種別は「可変」となっており、そのデータ項目名は「SHAMEI」であることが分かる。そこで、ポインタを用いて図11のデータ項目情報55にアクセスし、データ項目「SHAMEI」の項目長13を得る。次に、3行に対応している印刷内容の31列に対応する位置から長さ13の文字列「株式会社 ○○物産 」を読み出し、配信ワークシート15のセルとして設定する。フィールド情報54の3行31列の位置情報は、配信ワークシート15の3行D列のセル位置に対応しているので、文字列「株式会社 ○○物産 」は3行D列のセル位置を始点とする長さ13の領域に設定される。
【0063】
また、フィールド情報54の5行1列のデータ項目名は「NUMBER」であるので、ポインタを用いてデータ項目情報55にアクセスし、データ項目「NUMBER」の項目長8を得る。そこで、5行に対応している印刷内容の1列に対応する位置から長さ8の文字列「 12000」を読み出し、配信ワークシート15の5行A列のセルとして設定する。他の位置の可変な印刷内容についても同様の処理が行われる。
【0064】
ここで、フィールド情報54のフィールド種別が「固定」の場合は、対応するデータ項目名がないので、印刷内容の文字列をそのまま読み出して、対応するセル位置に設定する。あるいは、フィールド情報54にも同じ文字列が格納されているので、その文字列を読み出して対応するセル位置に設定することもできる。
【0065】
このようにして作成された配信ワークシート15は、配信ワークシート作成部53から通信処理部2に渡され、通信処理部2により端末計算機21に送信される。端末計算機21では、その配信ワークシート15を受信手段23により受信し、表計算ソフトウェア24による処理を行う。これにより、元々ホスト計算機1において帳票52の印刷用に作成されていた帳票印刷データ13を、表計算ソフトウェア24で2次的に利用することが可能となる。
【0066】
第2の実施例によれば、今まで帳票52の印刷に利用していた帳票体裁定義情報16を配信ワークシート作成処理にそのまま流用することができる。したがって、ホスト計算機1上に新たに応用プログラムなどを作成する必要がなく、帳票印刷データ13を容易に端末計算機21に配信することができる。
【0067】
尚、第2の実施例において、図9に示された帳票52は一例に過ぎず、本発明は他の任意の帳票に対応することが可能である。その場合、帳票体裁定義情報16もまた、その帳票に対応したものが用いられる。
【0068】
【発明の効果】
本発明によれば、PC/WS等の端末計算機上の表計算ソフトウェアとホスト計算機との連携処理が自動的に行われ、表計算ソフトウェアを利用した業務処理が効率化される。このとき、ユーザは連携処理のために応用プログラム等を新たに作成する必要はない。具体的には、まず、表計算ソフトウェアを用いたデータ集計作業の延長上で、ホスト計算機へのデータ入力が可能となる。また、ホスト計算機の集計データを帳票により配信する業務がすでに多数あって、配信された帳票を端末計算機の表計算ソフトウェアを利用して再集計する必要があるような場合に、端末計算機へのデータ入力作業を削減することができる。
【図面の簡単な説明】
【図1】本発明の原理図である。
【図2】本発明の第1の実施例の構成図である。
【図3】第1の実施例におけるワークシート・フォーマット定義体の例を示す図である。
【図4】第1の実施例におけるデータ入力用ワークシートの例を示す図である。
【図5】第1の実施例におけるレコード領域原始文生成処理のフローチャートである。
【図6】第1の実施例におけるワークシート・フォーマット定義体生成処理のフローチャートである。
【図7】第1の実施例におけるREAD命令の処理フローチャートである。
【図8】第1の実施例におけるデータ入力用ワークシート解析処理のフローチャートである。
【図9】本発明の第2の実施例の構成図である。
【図10】第2の実施例におけるフィールド情報の例を示す図である。
【図11】第2の実施例におけるデータ項目情報の例を示す図である。
【図12】第2の実施例における配信ワークシート作成処理のフローチャートである。
【符号の説明】
1 ホスト計算機
2 通信処理部
3 原型ワークシート
4 レコード領域原始文生成手段
5 ワークシート・フォーマット定義体生成手段
6 レコード領域原始文
7 応用プログラム実行手段
8 データベース
9 データ入力用ワークシート解析手段
10 ワークシート・フォーマット定義体
11 データ入力用ワークシート
12 帳票印刷データ作成手段
13 帳票印刷データ
14 配信ワークシート作成手段
15 配信ワークシート
16 帳票体裁定義情報
21 端末計算機
22 送信手段
23 受信手段
24 表計算ソフトウェア
25 表示装置
31 レコード領域原始文生成部
32 ワークシート・フォーマット定義体生成部
33 データ入力用ワークシート解析部
34 応用プログラム
35 COPYライブラリ
36 フォーマットライブラリ
41 セル情報
42、55 データ項目情報
51 帳票印刷データ印刷装置
52 帳票
53 配信ワークシート作成部
54 フィールド情報
[0001]
[Industrial application fields]
The present invention relates to a data processing system that performs business processing using a terminal computer such as a personal computer or a workstation (hereinafter referred to as PC / WS) and a host computer, and spreadsheet software that operates on the PC / WS; The present invention relates to spreadsheet software linkage processing that enables online linkage processing with a program or data on a host computer.
[0002]
[Prior art]
In recent years, in order to perform business processing and the like, an increasing number of users introduce spreadsheet software that operates on a PC / WS. Accordingly, it is desired to improve the efficiency of business processing and the like by linking the spreadsheet software on the PC / WS with the processing on the host computer connected to the PC / WS via a line.
[0003]
An example of a conventional spreadsheet software cooperation processing apparatus is shown in the prior application “Spreadsheet software cooperation processing apparatus” (Japanese Patent Laid-Open No. 5-73590). In this spreadsheet software cooperation processing apparatus, first, a prototype worksheet that is definition information of tabular data created by spreadsheet software is transmitted from the PC / WS to the host computer. Based on the received original worksheet, the host computer creates a record area source sentence that defines the record area in the table and a worksheet format definition body that is format information necessary for creating the distribution worksheet. Then, a record area source sentence is incorporated into an application program that performs database processing or the like on the host computer, and the application program is executed. The application program outputs a specific data processing result as a record designated by the record area source sentence. Next, while referring to the worksheet format definition body, the host computer embeds the contents of the record output by the application program in a table to create a table-type distribution worksheet. Since the distribution worksheet is created based on the original worksheet sent from the PC / WS, it is in a format that can be processed by the spreadsheet software on the PC / WS. The created distribution worksheet is transmitted from the host computer to the PC / WS and used as a processing target of the spreadsheet software. The spreadsheet software performs table data reorganization and display processing based on the distribution worksheet.
[0004]
Thus, according to the conventional spreadsheet software cooperation processing apparatus, the distribution worksheet embedded with the data on the host can be automatically distributed from the host computer to the PC / WS. The data input process is improved.
[0005]
[Problems to be solved by the invention]
However, the conventional spreadsheet software cooperation processing apparatus has the following problems.
[0006]
The conventional spreadsheet software linkage processing device was able to deliver a worksheet from the host computer to the PC / WS, but the worksheet entered using the PC / WS spreadsheet software was operated on the host computer. In order to use it as an application program and to use it as host computer data, it is necessary to incorporate special processing in consideration of the characteristics of spreadsheet software. However, since the worksheet format definition is not open to the user, the contents cannot be used. Therefore, for the data input to the host computer using a table meter Sanso software, the user must perform the task of incorporating the complex processing to the application program.
[0007]
In addition, regarding the distribution of the worksheet to the PC / WS, it is necessary to newly create an application program for distributing the worksheet that operates on the host computer. Therefore, in order to input data from the host computer to the PC / WS, the user must create a new application program.
[0008]
The present invention provides a spreadsheet software linkage processing apparatus and method capable of easily performing linkage processing between spreadsheet software on a terminal computer such as a PC / WS and a program or data on a host computer. With the goal.
[0009]
[Means for Solving the Problems]
FIG. 1 is a diagram showing the principle of an information processing system provided with a spreadsheet software cooperation processing apparatus according to the present invention in a host computer 1 . The information processing system in FIG. 1 includes a host computer 1 and a terminal computer 21 connected via an online line, and a display device 25 for the terminal computer 21. The terminal computer 21 includes a transmission unit 22, a reception unit 23, and a spreadsheet software 24. Further, the spreadsheet software linkage processing device in the host computer 1 includes a communication processing unit 2, a record area source sentence generation means 4, a worksheet format definition body generation means 5, an application program execution means 7, and a data input worksheet analysis. Means 9, form print data creation means 12, and delivery worksheet creation means 14 are provided.
[0010]
In FIG. 1, the spreadsheet software 24 on the terminal computer 21 performs a spreadsheet process and displays the table on the display device 25. The transmission means 22 transmits the original worksheet 3 and the data input worksheet 11 created by the spreadsheet software 24 to the communication processing unit 2 via the online line.
[0011]
The communication processing unit 2 receives the prototype worksheet 3 and the data input worksheet 11 generated by the spreadsheet software 24 from the terminal computer 21. The record area source sentence generation means 4 analyzes the definition information on the individual data of the table constituting the prototype worksheet 3, and generates the record area source sentence 6 including the array data of the record area.
[0012]
The worksheet format definition body generating unit 5 generates a worksheet format definition body 10 including definition information on the form of the worksheet from the original worksheet 3.
[0013]
Application program execution unit 7, the record area source text 6 produced is incorporated, performed by referring to row earthenware pots Applied program processes input data notified in the record area specified by the record area source text 6 To do.
[0014]
Data input worksheet analyzing means 9, with reference to the work sheet format definition 10 analyzes the data input worksheet 11 generates input data, the input data in the record area of the application program Notice.
[0015]
The application program execution means 7 executes an application program that instructs the output of the form print data 13 used for printing the form usable by the spreadsheet software 24 as data.
[0016]
In response to an instruction from the application program, the form print data creation means 12 creates form print data 13, and the distribution worksheet creation means 14 refers to the form appearance definition information 16 relating to the form appearance described above. A distribution worksheet 15 is created from the printed form print data 13.
[0017]
The communication processing unit 2 transmits the distribution worksheet 15 to the terminal computer 21.
On the other hand, the receiving means 23 of the terminal computer 21 receives the distribution worksheet 15 from the communication processing unit 2 via the online line, and the spreadsheet software 24 performs processing using the data included in the distribution worksheet 15. .
[0018]
[Action]
The terminal computer 21 and the host computer 1 exchange worksheet information such as the original worksheet 3, the data input worksheet 11, and the distribution worksheet 15, and perform cooperative processing related to spreadsheets.
[0019]
First, in the host computer 1, the record area source sentence 6 is automatically generated by the record area source sentence generation means 4 from the original worksheet 3 created using the spreadsheet software 24 on the terminal computer 21, and the application program Can incorporate the record area source sentence 6. Also, a worksheet / format definition body 10 is generated from the same original worksheet 3 by the worksheet / format definition body generation means 5, and the data input worksheet analysis means 9 uses this to generate a data input worksheet 11. Can be analyzed.
[0020]
Both the record area source sentence 6 and the worksheet format definition body 10 are generated from the same original worksheet 3 and have common information on the attributes of the data items. The application program execution means 7 receives the input data converted into the format of the record area source sentence 6 by the data input worksheet analysis means 9 and causes the application program to perform processing such as calculation using the input data.
[0021]
As a result, the data created by the spreadsheet software 24 is automatically input to the application program, and the rich operability of the spreadsheet software 24 can be utilized for data input processing to the host computer 1. In addition, data can be input to the host computer more easily than a conventional spreadsheet software cooperation processing apparatus.
[0022]
When the application program issues an instruction to output the form print data 13, the form print data creation unit 12 creates the form print data 13 in accordance with the form defined by the form appearance definition information 16. The form print data 13 is data conventionally used to print a form in the host computer 1, and the printed form has a format approximate to a table created by the spreadsheet software 24. From the form print data 13, a distribution worksheet 15 in a form that can be processed by the spreadsheet software 24 is generated by the distribution worksheet generation means 14. At this time, the data item information included in the form appearance definition information 16 is referred to.
[0023]
The created distribution worksheet 15 is transmitted to the terminal computer 21 by the communication processing unit 2, and the spreadsheet software 24 performs processing such as spreadsheet using data included therein.
[0024]
As a result, the contents of the form output by the host computer 1 are automatically input to the terminal computer 21 and can be used for the processing of the spreadsheet software 24. Further, it is not necessary to create a new distribution program as compared with the conventional spreadsheet software cooperation processing apparatus, and data can be distributed more easily.
[0025]
【Example】
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 2 is a configuration diagram of the spreadsheet software cooperation processing apparatus according to the first embodiment of this invention. 2 is provided in the host computer 1 of FIG. 1, and includes a record area source sentence generation unit 31, a worksheet format definition body generation unit 32, and a data input worksheet analysis unit 33. . The record area source sentence generation unit 31, the worksheet format definition body generation unit 32, and the data input worksheet analysis unit 33 are realized by an arithmetic processing function of a CPU (central processing unit) (not shown) in the host computer 1. .
[0026]
In FIG. 2, the prototype worksheet 3 is created by the spreadsheet software 24 of the terminal computer 21, then transmitted to the host computer 1 and received by the communication processing unit 2. In this example, the original worksheet 3 describes a table composed of three columns A, B, and C. The first row to the sixth row represent the array of cells in the table, and the seventh row to the tenth row. Up to the eye is the record data item description section.
[0027]
“January sales” in the first row represents an annotation for the entire table, and “Product name”, “Quantity”, and “Sales” in the second row correspond to the data items in columns A, B, and C, respectively. Represents a headword. “! A”, “! B”, and “! C” in the third line represent variable names corresponding to “product name”, “quantity”, and “sales”, respectively. The results of data processing in the host computer 1 are stored in these variables. The fourth and fifth lines are the same as the third line. “Total” on the 6th line is a headword that represents the total for each product name on the 3rd to 5th lines. “@SUM (B3: B5)” is a variable on the 3rd to 5th lines! This represents a function for calculating the sum of B, and “@SUM (C3: C5)” is a variable on the 3rd to 5th lines! This represents a function for calculating the sum of C.
[0028]
“RECORD NAME = REC001” on the seventh line represents the record definition, and the eighth to ninth lines represent the description of each data item. For example, “A DATA PIC = (N, 8)...” On the 8th line is a variable! This indicates that the data type of A is N (Japanese) and the length is 8 characters, and “B DATA PIC = (9,6)... It represents that the data type of B is 9 (numeric) and the length is 6 characters (6 digits). The 10th line is the same as the 9th line.
[0029]
The record area source sentence generation unit 31 analyzes the record / data item description part of the prototype worksheet 3 and generates the record area source sentence 6. In this embodiment, the application program 34 described in the COBOL language generates the record area source sentence 6 as the COPY library 35 that can be incorporated into the program by the COPY phrase.
[0030]
The worksheet format definition body generation unit 32 refers to the original worksheet 3 and generates a worksheet format definition body 10 including cell information and data item information. In this embodiment, the format is generated as a format library 36 having the worksheet format definition body 10 as a member.
[0031]
The application program 34 incorporates the record area source sentence 6 into the program by a COPY phrase “COPY REC001”, and issues an OPEN instruction, a READ instruction, and a CLOSE instruction. The OPEN command opens a display file having the record specified by the record area source sentence 6 as its component, reads the contents of the display file by a READ command, and closes the display file by a CLOSE command. Here, the display file refers to a virtual file for accessing a display, a printer, or the like, and includes the contents of the data input worksheet 11 in this embodiment.
[0032]
The data input worksheet 11 is a worksheet in which variables and function values in the table of the original worksheet 3 are replaced with specific input data. After being generated by the spreadsheet software on the terminal computer 21, the host computer 1 is transmitted. The data input worksheet analysis unit 33 refers to the worksheet format definition body 10, extracts input data from the received data input worksheet 11, and applies it to the application program 34 incorporating the record area source sentence 6. The input data is notified in the same format as the record area source sentence 6. At this time, the input data is converted into the format of the record area source sentence 6, and the application program 34 can perform processing using individual data input from the terminal computer 21.
[0033]
FIG. 3 shows an example of a worksheet format definition body 10 corresponding to the original worksheet 3 of FIG. The worksheet format definition body 10 shown in FIG. 3 includes cell information 41 and data item information 42. The cell information 41 includes a cell address indicating the position of the cell in the table of the original worksheet 3, a cell type indicating the cell type, a specific character string / variable name / function which is the content of the cell, and other cells. An attribute is described. In the data item information 42, a variable name corresponding to the data item, a data type indicating the variable type, an item length indicating the variable length, an offset in the corresponding record, and the number of repetitions of the same variable are described. The
[0034]
FIG. 4 shows an example of a data input worksheet 11 corresponding to the original worksheet 3 of FIG. The data input worksheet 11 shown in FIG. 4 includes the variables “! A”, “! B”, “! C” on the 3rd to 5th rows and the function “6” on the 6th row in the table of the original worksheet 3 in FIG. @SUM (B3: B5) ”and“ @SUM (C3: C5) ”are each replaced with specific data.
[0035]
Next, the record area source sentence generation process by the record area source sentence generation unit 31 and the worksheet format definition body generation process by the worksheet format definition body generation unit 32 will be described with reference to FIGS.
[0036]
FIG. 5 is a flowchart of the record area source sentence generation process. For example, the record area source sentence 6 is generated from the original worksheet 3 of FIG. 2 by the record area source sentence generation process of FIG. When the process is started in FIG. 5, the record area source sentence generation unit 31 first extracts definition information about the record or data item from the record / data item description unit of the prototype worksheet 3 (step S <b> 1). If there is no definition information, it is determined that the record / data item description portion has ended (step S2, Yes), and the process ends. Next, it is determined whether or not the extracted definition information corresponds to a record definition (step S3). If it is a record definition, a record statement generation process is performed (step S5). And the process after step S1 is repeated.
[0037]
For example, since the definition information on the seventh line of the original worksheet 3 in FIG. 2 corresponds to the record definition, “01” is set as the level information, and the designated record name is set (step S5). As a result, “01 REC001” in the first line of the record area source sentence 6 in FIG. 2 is generated.
[0038]
If the definition information relates to the data item in step S3, a data sentence generation process is performed (step S4). In the data sentence generation process, level information is set, a data item name, a data item attribute, and a data item length are obtained and set. And the process after step S1 is repeated.
[0039]
For example, the definition information on the eighth line of the original worksheet 3 in FIG. 2 corresponds to the first data item definition, so level information “02” is set, and the group item name “REC001-DATA” of the data item is set. . This group item name is added to identify an array of data items set to a lower level “10”. Next, level information “10” and data item name “A” are set. Further, the data item attribute and the data item length are combined and set as array data such as “OCCURS 3” and “PIC N (8)”. Here, N (8) represents a Japanese character string having a data item length of 8, and “OCCURS 3” represents that the same type of character string is repeated three times. The same processing is performed for the definition information on lines 9 and 10 to generate a data sentence of level “10”.
[0040]
FIG. 6 is a flowchart of the worksheet format definition body generation process. 6, for example, the worksheet format definition body 10 in FIG. 3 is generated from the original worksheet 3 in FIG. 2. When the processing is started in FIG. 6, the worksheet format definition body generating unit 32 first substitutes 1 for each of the control variables m and n (steps S11 and S12), and m rows n of the original worksheet 3 Cell information of the column is extracted (step S13). Next, it is determined whether the extracted cell information is a variable cell or a fixed value cell (step S14). If it is a variable cell, variable cell conversion processing is performed (step S15). If it is a fixed value cell, fixed value cell conversion processing is performed. Is performed (step S16). Note that a cell for which a function is set is processed as a fixed value cell.
[0041]
Next, it is determined whether or not cell information of all columns in m rows has been extracted (step S17). If the extraction of cell information has not been completed, n is set to n + 1 (step S18), and the processing after step S13 is performed. repeat. If extraction of cell information for all columns is completed in step S17, it is next determined whether or not cell information for all rows has been extracted (step S19). If the extraction of the cell information has not been completed, m is set to m + 1 and n is set to 1 (steps S20 and S21), and the processes after step S13 are repeated. When it is determined in step S19 that extraction of cell information for all rows has been completed, the process ends.
[0042]
In the variable cell conversion process in step S15, attribute information is extracted from the cell information, and the cell and the data item are associated with each other and converted into worksheet format definition information. For example, since the cell information of 3 rows and 1 column (3 rows and A columns) in FIG. 2 represents the variable “! A”, the cell information “A3” corresponding to the cell information 41 in the worksheet format definition body 10 in FIG. ”, Cell type“ variable ”, and variable name“ A ”are set, and associated with the variable name“ A ”in the data item information 42 using the pointer. In the column of the variable name “A” in the data item information 42, the data type “N”, the item length “8”, the in-record offset “0”, and the repetition number “3” are set. “(First in the array)” in the variable name column of the cell information 41 represents the first of the variables of the same name repeated three times. Similar processing is performed for the other variable cells.
[0043]
Further, in the fixed value cell conversion processing in step S16, attribute information and character string information are extracted from the cell information and converted into worksheet format definition information. For example, the cell information of 1 row 1 column (1 row A column) in FIG. 2 represents the fixed value “January sales”, so the cell information 41 includes the corresponding cell address “A1”, cell type “fixed value”. ", The character string" Sales for January "is set. In the case of a fixed value cell, unlike the case of a variable cell, it is not necessary to associate with the data item information 42. Similar processing is performed for other fixed value cells.
[0044]
By repeating such processing, a worksheet format definition body 10 as shown in FIG. 3 is finally generated.
The application program 34 in which the record area source sentence 6 is incorporated by the COPY phrase reads the data input worksheet 11 from the display file by the READ instruction, and causes the data input worksheet analysis unit 33 to analyze the contents. Next, processing of the READ instruction and data input worksheet analysis processing by the data input worksheet analyzer 33 will be described with reference to FIGS.
[0045]
FIG. 7 is a processing flowchart of the READ instruction. When the processing is started in FIG. 7, the application program 34 first checks the parameters of the display file (step S31), and if it is found that the data input worksheet 11 received from the terminal computer 21 is included, this is stored in the memory. (Step S32). Then, the data input worksheet analysis unit 33 is called to request analysis of the captured data input worksheet 11, and an input record is generated (step S33). Next, a return code is set (step S34), and the process returns to the processing of the next instruction of the application program 34.
[0046]
FIG. 8 is a flowchart of the data input worksheet analysis process performed by the data input worksheet analyzer 33 called in step S33 of FIG. When the processing is started in FIG. 8, the data input worksheet analysis unit 33 first substitutes 1 for each of the control variables m and n (steps S41 and S42), and the m rows of the data input worksheet 11 The n columns of cell information are extracted (step S43). Next, referring to the worksheet format definition body 10, it is determined whether the extracted cell information is a variable cell or a fixed value cell (step S44). At this time, the cell in which the function is set is included in the fixed value cell.
[0047]
For example, the cell address of the cell in the 1st row and 1st column (1st row A column) of the data input worksheet 11 in FIG. 4 is A1, and the cell type corresponding to the cell address A1 in the cell information 41 in FIG. 3 is a fixed value. Therefore, it can be seen that this cell is a fixed value cell. Similarly, the cell address of the cell in the 3rd row and 1st column (3rd row and A column) of the data input worksheet 11 is A3, and the cell type corresponding to the cell address A3 in the cell information 41 is a variable. It can be seen that the cell is a variable cell. In addition, since the cell address of the cell of 6 rows and 2 columns (6 rows and B columns) is B6 and the corresponding cell type is a function, this cell is treated as a fixed value cell.
[0048]
In the case of a fixed value cell, the character string information is already set in the worksheet format definition body 10, so that it is not necessary to read it. Therefore, it is determined whether or not cell information of all columns of m rows has been extracted (step S46). If the extraction of cell information has not been completed, n is set to n + 1 (step S47), and the processing after step S43 is performed. repeat. If the extraction of the cell information of all the columns is completed in step S46, it is next determined whether the cell information of all the rows has been extracted (step S48). If the extraction of the cell information has not been completed, m is set to m + 1 and n is set to 1 (steps S49 and S50), and the processes after step S43 are repeated. Then, when it is determined in step S48 that the extraction of the cell information of all the rows has been finished, the processing is finished.
[0049]
In the case of a variable cell in step S44, input data conversion processing is performed to read the information (step S45), and processing subsequent to step S46 is performed. In the input data conversion process, character string information is extracted from the variable cell, and the data item information corresponding to the variable cell at the cell address is obtained by referring to the worksheet format definition body 10. Then, the character string extracted from the variable cell is converted in accordance with the data type specified by the data item information and assembled as a record.
[0050]
For example, since the cell of 3 rows and 1 column (3 rows and A columns) of the data input worksheet 11 is a variable cell, the character string “Japanese sake” is extracted. Next, the data item information 42 is accessed using the pointer stored in the cell address A3 in the cell information 41 of the worksheet format definition body 10, and the data type, item length, and record in the corresponding variable name A Get the offset. Then, the character string “Japanese sake” is converted in accordance with the data item information to generate an input record. Further, since the cell in the 3rd row and 2nd column (3rd row and B column) of the data input worksheet 11 is also a variable cell, the character string “100” is extracted. Next, the data item information 42 is accessed using the pointer stored in the cell address B3 in the cell information 41, and the corresponding variable name B information is obtained. Then, the character string “100” is converted in accordance with the data item information, and an input record suitable for the format of the record area source sentence 6 is generated. Similar processing is performed for the other variable cells.
[0051]
When the character strings are extracted from all the variable cells included in the data input worksheet 11 in this way, the data input worksheet analysis unit 33 notifies the application program 34 of the generated input record. The application program 34 reads an input record using the incorporated record area source sentence 6 and performs processing such as calculation.
[0052]
According to the first embodiment, the data input worksheet analysis unit 33 automatically extracts input records from the data input worksheet 11 by using the worksheet format definition body 10. Data input from 24 to the application program 34 is facilitated.
[0053]
Although the application program 34 is described in the COBOL language in the first embodiment, the present invention can be similarly applied to application programs described in other languages. The original worksheet 3 shown in FIG. 2 is only an example, and can correspond to other arbitrary table data. In this case, the record area source sentence 6 and the worksheet format definition body 10 corresponding to the original worksheet 3 are also generated.
[0054]
Next, a second embodiment of the present invention will be described with reference to FIGS.
FIG. 9 is a configuration diagram of a spreadsheet software cooperation processing apparatus according to the second embodiment of this invention. The spreadsheet software cooperation processing apparatus of FIG. 9 is provided in the host computer 1 of FIG. The distribution worksheet creation unit 53 is realized by the arithmetic processing function of the CPU in the host computer 1. 9 is a printing device such as a printer connected to the host computer 1, for example.
[0055]
In FIG. 9, form print data 13 is form print data created by the form print data creation means 12 of the host computer 1 upon receiving an output instruction from the application program. For example, until now, a form 52 has been printed based on the form print data 13 by the form print data printing apparatus 51. The form 52 has a format suitable for the table created by the spreadsheet software 24, and the data can be re-input to the terminal computer 21 and used for processing. In this example, the form 52 represents an order list of products, and includes columns for order number, product name, quantity, unit price, and subtotal. For example, the order quantity of the product XXXXXXX with the order number 12000 is 100, the unit price is ¥ 5,000, and the subtotal is ¥ 500,000. In addition, the total amount of all orders received is ¥ 800,000.
[0056]
The distribution worksheet creation unit 53 creates the distribution worksheet 15 from the form print data 13 with reference to the form appearance definition information 16. The form appearance definition information 16 is definition information that is referred to when the form print data creation unit 12 creates the form print data 13, and includes field information 54 and data item information 55. In FIG. 9, the distribution worksheet 15 is created as a worksheet having 31 rows and 6 columns. Each item on the distribution worksheet 15 is arranged at a position approximate to the case where it is printed on the form 52.
[0057]
FIG. 10 shows field information 54 corresponding to the form 52 of FIG. 9, and FIG. 11 shows data item information 55 corresponding to the form 52 of FIG. The field information 54 stores the position of each field in the table of the form 52, the type of the fixed field or variable field, the character string / data item name, and the character size. The data item information 55 stores the data item name of the variable field. Stores attributes about. In the field information 54 of FIG. 10, each row position corresponds to a row with the same number in the distribution worksheet 15 in FIG. 9, and each column value 1, 11, 23, 31, 41, 49 is Corresponding to columns A, B, C, D, E, and F, respectively.
[0058]
The data item attributes stored in the data item information 55 include a data type, an item length, an in-record offset, a repetition count, and a numerical value editing attribute. Among these, the data type, item length, offset within record, and number of repetitions have the same meaning as the data item information 42 in FIG. The information of each variable field of the field information 54 is related to the information of the corresponding data item in the data item information 55 using a pointer in advance. For example, since the field information 54 in the 3rd row and 31st column of the field information 54 has a data item “SHAMEI”, a pointer indicating the information “SHAMEI” in the data item information 55 is stored.
[0059]
FIG. 12 is a flowchart of a delivery worksheet creation process by the delivery worksheet creation unit 53. For example, the distribution worksheet 15 is generated from the form print data 13 of FIG. 9 by the distribution worksheet generation processing of FIG. When the processing is started in FIG. 12, the distribution worksheet creation unit 53 first extracts field information corresponding to the first item in the form 52 from the form appearance definition information 16 (step S51), and starts from the form print data 13. The print content of the line is taken out (step S52). Next, it is determined whether or not the line position of the extracted field information (item information) matches the line position of the extracted print content (step S53). If the two do not match, the print content of the next line is extracted from the form print data 13 (step S54), and the determination in step S53 is performed again.
[0060]
If the two row positions match in step S53, cell generation processing is performed (step S55), and it is determined whether or not the final information (final item) of the field information 54 has been reached (step S56). If the final item has not been reached, the field information corresponding to the next item in the form 52 is extracted from the form appearance definition information 16 (step S57), and the processes in and after step S53 are repeated. If it is determined in step S56 that the final item has been reached, the process ends.
[0061]
In the cell generation processing in step S55, a corresponding character string is extracted from the print contents based on the column position of the extracted item information and the item length of the corresponding data item. Then, one cell is generated from the row position and column position of the item information, the item length of the data item, and the extracted character string. If this process is performed for all print contents of the form print data 13, a distribution worksheet 15 is generated.
[0062]
For example, in the 3 rows and 31 columns of the field information 54 in FIG. 10, the field type is “variable” and the data item name is “SHAMEI”. Therefore, the data item information 55 of FIG. 11 is accessed using the pointer, and the item length 13 of the data item “SHAMEI” is obtained. Next, from the position corresponding to the 31 columns of the print content corresponding to the 3 rows, the character string “INC. ○○ Products Is set as a cell of the distribution worksheet 15. Since the position information of 3 rows and 31 columns of the field information 54 corresponds to the cell position of the 3 rows and D columns of the distribution worksheet 15, ○○ Products "Is set in a region of length 13 starting from the cell position of 3 rows and D columns.
[0063]
Since the data item name in the 5th row and 1st column of the field information 54 is “NUMBER”, the data item information 55 is accessed using the pointer, and the item length 8 of the data item “NUMBER” is obtained. Therefore, a character string “8” in length from the position corresponding to one column of the print content corresponding to five lines. 12000 "is read out and set as a cell in the 5th row and Ath column of the distribution worksheet 15. Similar processing is performed for variable print contents at other positions.
[0064]
Here, when the field type of the field information 54 is “fixed”, since there is no corresponding data item name, the character string of the print content is read as it is and set to the corresponding cell position. Alternatively, since the same character string is stored in the field information 54, the character string can be read out and set to the corresponding cell position.
[0065]
The distribution worksheet 15 created in this way is transferred from the distribution worksheet creation unit 53 to the communication processing unit 2 and transmitted to the terminal computer 21 by the communication processing unit 2. In the terminal computer 21, the distribution worksheet 15 is received by the receiving means 23 and processed by the spreadsheet software 24. As a result, the form print data 13 originally created for printing the form 52 in the host computer 1 can be secondarily used by the spreadsheet software 24.
[0066]
According to the second embodiment, the form appearance definition information 16 that has been used for printing the form 52 so far can be directly used for the distribution worksheet creation process. Therefore, it is not necessary to create a new application program or the like on the host computer 1, and the form print data 13 can be easily distributed to the terminal computer 21.
[0067]
In the second embodiment, the form 52 shown in FIG. 9 is merely an example, and the present invention can correspond to other arbitrary forms. In this case, the form appearance definition information 16 corresponding to the form is also used.
[0068]
【The invention's effect】
According to the present invention, the linkage processing between the spreadsheet software on the terminal computer such as a PC / WS and the host computer is automatically performed, and the business processing using the spreadsheet software is made efficient. At this time, the user does not need to newly create an application program or the like for the cooperation processing. Specifically, first, data can be input to the host computer as an extension of the data tabulation work using spreadsheet software. In addition, if there is already a lot of work to distribute the aggregate data of the host computer in a form, and the distributed form needs to be re-aggregated using the spreadsheet software of the terminal computer, the data to the terminal computer Input work can be reduced.
[Brief description of the drawings]
FIG. 1 is a principle diagram of the present invention.
FIG. 2 is a configuration diagram of a first embodiment of the present invention.
FIG. 3 is a diagram illustrating an example of a worksheet format definition body in the first embodiment.
FIG. 4 is a diagram showing an example of a data input worksheet in the first embodiment.
FIG. 5 is a flowchart of record area source sentence generation processing in the first embodiment;
FIG. 6 is a flowchart of a worksheet format definition body generation process in the first embodiment.
FIG. 7 is a processing flowchart of a READ instruction in the first embodiment.
FIG. 8 is a flowchart of a data input worksheet analysis process in the first embodiment.
FIG. 9 is a configuration diagram of a second embodiment of the present invention.
FIG. 10 is a diagram illustrating an example of field information in the second embodiment.
FIG. 11 is a diagram showing an example of data item information in the second embodiment.
FIG. 12 is a flowchart of a delivery worksheet creation process in the second embodiment.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Host computer 2 Communication processing part 3 Prototype worksheet 4 Record area source sentence generation means 5 Worksheet format definition body generation means 6 Record area source sentence 7 Application program execution means 8 Database 9 Data input worksheet analysis means 10 Worksheet Format definition body 11 Data input worksheet 12 Form print data creation means 13 Form print data 14 Distribution worksheet creation means 15 Distribution worksheet 16 Form appearance definition information 21 Terminal computer 22 Transmission means 23 Reception means 24 Spreadsheet software 25 Display Device 31 Record area source sentence generation unit 32 Worksheet format definition generation unit 33 Data input worksheet analysis unit 34 Application program 35 COPY library 36 Format library 41 Cell information 42, 55 Over data item information 51 form the print data printing device 52 form 53 distribution worksheet creation unit 54 field information

Claims (1)

ワークシート情報に基づいて表計算の処理を行なう表計算ソフトウェアが動作する端末計算機に、応用プログラムの指示により出力された出力データをオンライン回線を介して配信する処理を行うホスト計算機内に設けられた表計算ソフトウェア連携処理装置において、
前記表計算ソフトウェアがデータとして使用可能な帳票を印刷するために用いられる帳票印刷データの出力を指示する前記応用プログラムを実行する応用プログラム実行手段と、
前記応用プログラムからの指示を受けて、前記帳票印刷データを作成する帳票印刷データ作成手段と、
前記帳票の表のデータ項目の行位置、列位置、および項目長を記述した帳票体裁定義情報を参照して、各データ項目の行位置が前記帳票印刷データの各印刷内容の行位置に一致するかどうかを判定し、行位置が一致したデータ項目の列位置および項目長を元にして、行位置が一致した印刷内容から対応する文字列を抽出し、該文字列を含むセル情報からなる配信ワークシートを作成する配信ワークシート作成手段と、
前記配信ワークシートを前記端末計算機に送信する通信処理手段と
を備えることを特徴とする表計算ソフトウェア連携処理装置。
Provided in the host computer that performs processing to distribute the output data output by the instruction of the application program to the terminal computer that operates the spreadsheet software that performs spreadsheet processing based on the worksheet information via the online line In the spreadsheet software linkage processing device,
Application program execution means for executing the application program for instructing output of form print data used for printing the form usable as data by the spreadsheet software;
In response to an instruction from the application program, form print data creation means for creating the form print data;
With reference to the form appearance definition information describing the line position, column position, and item length of the data item in the form table, the line position of each data item matches the line position of each print content of the form print data. A corresponding character string is extracted from the print content with the matching line position based on the column position and the item length of the data item with the matching line position, and the distribution is made up of cell information including the character string. A distribution worksheet creation means for creating a worksheet;
A spreadsheet software cooperation processing apparatus comprising: communication processing means for transmitting the distribution worksheet to the terminal computer .
JP2003137951A 2003-05-15 2003-05-15 Spreadsheet software linkage processing apparatus and method Expired - Lifetime JP4068008B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003137951A JP4068008B2 (en) 2003-05-15 2003-05-15 Spreadsheet software linkage processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003137951A JP4068008B2 (en) 2003-05-15 2003-05-15 Spreadsheet software linkage processing apparatus and method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP13403595A Division JP4067585B2 (en) 1995-05-31 1995-05-31 Spreadsheet software linkage processing apparatus and method

Publications (2)

Publication Number Publication Date
JP2003346075A JP2003346075A (en) 2003-12-05
JP4068008B2 true JP4068008B2 (en) 2008-03-26

Family

ID=29774795

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003137951A Expired - Lifetime JP4068008B2 (en) 2003-05-15 2003-05-15 Spreadsheet software linkage processing apparatus and method

Country Status (1)

Country Link
JP (1) JP4068008B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2025049128A (en) * 2023-09-20 2025-04-03 ソフトバンクグループ株式会社 system

Also Published As

Publication number Publication date
JP2003346075A (en) 2003-12-05

Similar Documents

Publication Publication Date Title
US7523395B1 (en) Web application generator for spreadsheet calculators
JP7000341B2 (en) Machine learning-based web interface generation and testing system
US7376552B2 (en) Text generator with an automated decision tree for creating text based on changing input data
AU2002228506B2 (en) Data transfer and/or transformation system and method
US20050235202A1 (en) Automatic graphical layout printing system utilizing parsing and merging of data
JP2004501450A (en) Create arbitrary XML documents using DHTML and XSLT
Renfro Econometric software: The first fifty years in perspective
CN117851457A (en) Chart generation method, device, equipment and storage medium
Phiri Information technology in construction design
JP2003256627A (en) Workflow extraction method and apparatus
JP4068008B2 (en) Spreadsheet software linkage processing apparatus and method
JP4067585B2 (en) Spreadsheet software linkage processing apparatus and method
US7596750B2 (en) Data processing method, program, and information processor
CN118797004A (en) Analysis report generation method, analysis report generation device and electronic equipment
JP5469985B2 (en) Data delivery method and general-purpose data acquisition method
JP2020126485A (en) Information processing apparatus and program
CN116757167A (en) Flexible development method based on custom field
US7827504B2 (en) Methods and apparatus for generating an executable file from a use case
CN115098439A (en) Method, device, equipment and medium for generating excel report file
JP7680523B1 (en) Information processing device, information processing system, information processing method, and program
JP7753428B1 (en) Business support system, business support method, and program
JP2002091809A (en) Data representation format conversion apparatus and data representation format conversion method
JP2831866B2 (en) Spreadsheet software cooperation processing device
JP2001222536A (en) Patent map creation system, its creation method, and recording medium
JP2025104537A (en) Information processing device, information processing system, information processing method, and program

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051018

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051207

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20051227

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071116

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080109

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

Free format text: PAYMENT UNTIL: 20110118

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110118

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120118

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130118

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130118

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140118

Year of fee payment: 6

EXPY Cancellation because of completion of term