Einzelnen Beitrag anzeigen

Benutzerbild von Chemiker
Chemiker

Registriert seit: 14. Aug 2005
1.858 Beiträge
 
Delphi 11 Alexandria
 
#15

AW: Delphi 2010 Professional & Excel 2007 TypeLibrary Probleme

  Alt 13. Nov 2011, 19:00
Hallo Cyberaxx,
noch ein Versuch:
Delphi-Quellcode:
procedure TForm1.btnRahmenZeichnenClick(Sender: TObject);
var
  OLEvExcel: OleVariant;
begin
  OLEvExcel := CreateOleObject('Excel.Application');
  OLEvExcel.Visible:= TRUE;
  OLEvExcel.Workbooks.add;
  OLEvExcel.ActiveWorkbook.Worksheets['Tabelle1'];

  OLEvExcel.Range['A1:L3'].Select;


  olevEXCEL.Selection.Borders[xlDiagonalDown].LineStyle := xlNone;
  olevEXCEL.Selection.Borders[xlDiagonalUp].LineStyle := xlNone;

  olevEXCEL.Selection.Borders[xlEdgeLeft].LineStyle := xlDashDot;//xlContinuous;
  olevEXCEL.Selection.Borders[xlEdgeLeft].Color := clred;//xlAutomatic;
  olevEXCEL.Selection.Borders[xlEdgeLeft].TintAndShade := 0;
  olevEXCEL.Selection.Borders[xlEdgeLeft].Weight := xlMedium; //xlThick;

  olevEXCEL.Selection.Borders[xlEdgeTop].LineStyle := xlDashDot;// xlContinuous;
  olevEXCEL.Selection.Borders[xlEdgeTop].Color := clred;//xlAutomatic;
  olevEXCEL.Selection.Borders[xlEdgeTop].TintAndShade := 0;
  olevEXCEL.Selection.Borders[xlEdgeTop].Weight := xlMedium; //xlThick;

  olevEXCEL.Selection.Borders[xlEdgeBottom].LineStyle := xlDashDot;// xlContinuous;
  olevEXCEL.Selection.Borders[xlEdgeBottom].Color := clred;//xlAutomatic;
  olevEXCEL.Selection.Borders[xlEdgeBottom].TintAndShade := 0;
  olevEXCEL.Selection.Borders[xlEdgeBottom].Weight := xlMedium; //xlThick;

  olevEXCEL.Selection.Borders[xlEdgeRight].LineStyle := xlDashDot;// xlContinuous;
  olevEXCEL.Selection.Borders[xlEdgeRight].Color := clred;//xlAutomatic;
  olevEXCEL.Selection.Borders[xlEdgeRight].TintAndShade := 0;
  olevEXCEL.Selection.Borders[xlEdgeRight].Weight := xlMedium; //xlThick;

  ShowMessage('Rahmen in Excel ansehen');

  OLEvExcel.ActiveWorkBook.Saved:= TRUE;
  OLEvExcel.Workbooks.Close;

  OLEvExcel.Quit;
  OLEvExcel:= Unassigned;
end;
Bis bald Chemiker
wer gesund ist hat 1000 wünsche wer krank ist nur einen.
  Mit Zitat antworten Zitat