| | 2014/4/11 (金) 07:41:31  Mr.XRAY | 
 | ▼ snailさん折角のコードですので,やってみました.
 テストコードは以下です.
 新規プロジェクトを作成し,TButton と TStringGrid を配置.
 snail さんの以下の部分を変更
 
 if ( ArgGrid is TEditGrid ) = True then
 ↓
 if ( ArgGrid is TStringGrid ) = True then
 
 動作確認は,Windows 7 U64(SP1) + Delphi XE5(UP2) Pro (ヘヘヘッ)
 + Excel 2010
 
 この前に,snail さんのコード
 //=============================================================================
 //  フォーム生成時にテスト用データをStringGird1にセット
 //=============================================================================
 procedure TForm1.FormCreate(Sender: TObject);
 begin
 StringGrid1.DefaultDrawing := True;
 
 StringGrid1.ColCount        := 4;
 StringGrid1.FixedCols       := 1;
 StringGrid1.DefaultColWidth := 90;
 //ここまではオブジェクトインスペクタで設定してもよい
 
 //左端の列幅設定
 StringGrid1.ColWidths[0]    := 10;
 
 //テスト用の値をセット
 StringGrid1.Cells[1,0] := '調査番号';
 StringGrid1.Cells[2,0] := '都道府県';
 StringGrid1.Cells[3,0] := '結果値';
 
 //テスト用の値をセット
 StringGrid1.RowCount := 4;
 StringGrid1.Cells[1,1] := 'A-100';
 StringGrid1.Cells[1,2] := 'A-200';
 StringGrid1.Cells[1,3] := 'A-300';
 
 StringGrid1.Cells[2,1] := '東京都';
 StringGrid1.Cells[2,2] := '大阪府';
 StringGrid1.Cells[2,3] := '京都府';
 
 StringGrid1.Cells[3,1] := '500';
 StringGrid1.Cells[3,2] := '800';
 StringGrid1.Cells[3,3] := '300';
 end;
 
 //=============================================================================
 //  StringGrid1のセルデータをクリップボードにコピー
 //=============================================================================
 procedure TForm1.Button1Click(Sender: TObject);
 begin
 Cs_StrCellClipHtmlCopy(StringGrid1);
 end;
 
 
 const
 CrLf = #13#10;
 
 は sLineBreak 定数がありまね.
 http://mrxray.on.coocan.jp/Delphi/plSamples/200_MemoReadSpeed.htm#05-03
 
 TEditGrid って,これですか ?
 
 http://www.csjpn.com/soft/ware4.html#TEditGrid
 
 
 
  | 
 |