Q
計算結果などをExcelのファイルとして出力することはできますか?
A
fwrite_stringを使用してファイルへデータを出力します。その際にExcelのフォーマットに基づいて出力します。以下のようにプログラムしてください。
Filespec := 'test.csv'
open_file (Filespec, 'output', FileHandle)
Result := [1,2,3,4]
fwrite_string (FileHandle, 'Sample 1 : '+',') ←'Sample 1 : 'と書き、隣のセルに移動する
fwrite_string (FileHandle, Result+',')
fwrite_string (FileHandle, '\n') ←下の行に移動する
fwrite_string (FileHandle, 'Sample 2 :' +','+ Result+'\n')
close_file (FileHandle)
関連オペレーター
open_file
fwrite_string
close_file