// 打开文件
procedure TForm1.Button7Click(Sender: TObject);
begin
  xlApp.Connect;
  xlBook.ConnectTo(xlApp.Workbooks.Open('E:\book1.xls',NULL,false,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0));
  xlSheet.ConnectTo(xlBook.Sheets[1] as _WorkSheet);
  xlApp.Visible[0] := True;
end;// 获得分页符信息
procedure TForm1.Button9Click(Sender: TObject);
var
  Hpb,Vpb : integer;
  i,j : integer;
begin
  Hpb := xlSheet.HPageBreaks.Count;
  Vpb := xlSheet.VPageBreaks.Count;  listbox1.Items.Clear;
  listbox1.Items.Add('HPageBreaks='+inttostr(Hpb));
  listbox1.Items.Add('VPageBreaks='+inttostr(vpb));  for i := 1 to Hpb do
  begin
    j := xlSheet.HPageBreaks.Item[i].Location.Row;
    listbox1.Items.Add('vrow='+inttostr(j));
  end;
end;