Registriert seit: 14. Aug 2005
1.859 Beiträge
Delphi 11 Alexandria
|
AW: Delphi 2010 Professional & Excel 2007 TypeLibrary Probleme
13. Nov 2011, 20: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.
|