このサンプル アプリケーションを実行するには、次のようにします。
' 列のヘッダーをセットアップします。 Dim xlsheet As Excel.Worksheet Set xlsheet = ThisWorkbook.Worksheets(1) With xlsheet .Cells(5, 1) = "Date" .Cells(5, 2) = "UserLoginName" .Cells(5, 3) = "Host" .Cells(5, 4) = "Event Kind" .Cells(5, 5) = "Comment" End With ' 最上位の ClearCase オブジェクトに接続します。 Dim CC as New ClearCase.Application Dim Elem as CCElement Dim Record as CCHistoryRecord Dim Records as CCHistoryRecords Set Elem = CC.Element("<path>") ' ICCVOBObject インターフェイスを使用して履歴レコードを取得します。 Set Records = Elem.HistoryRecords(Nothing) Dim I As Integer I = 6 For Each Record In Records ' 以下の割り当てでは、左手が Excel オブジェクトです。 ' 右手が CAL オブジェクトです。 With xlsheet .Cells(I, 1) = Record.Date .Cells(I, 2) = Record.UserLoginName .Cells(I, 3) = Record.Host .Cells(I, 4) = Record.EventKind .Cells(I, 5) = Record.Comment End With I = I + 1 Next ' ワークシートをフォーマットします。 xlsheet.UsedRange.Select Selection.AutoFormat xlsheet.Cells(1, 1).Select