home *** CD-ROM | disk | FTP | other *** search
- { ..::EdHTML::.. }
- { System Plug-In v1.0 }
- { Autor: RaLib Group }
-
- //Przyklad: OLE i Excel
-
- Var ExcelWindow, NewWorkBooks, WorkBook, Cell, Range, Border, WorkSheet,
- Diagram, MyDiagram : Variant;
- Line, Column, LineCount, ColumnCount : Integer;
- begin
- ExcelWindow := CreateOleObject('Excel.Application');
- ExcelWindow.Visible := 1;
- ExcelWindow.Caption := 'Test';
- NewWorkBooks := ExcelWindow.Workbooks;
- WorkBook := NewWorkBooks.Add;
- LineCount := 10;
- ColumnCount := 5;
-
- For Line := 1 to LineCount do
- begin
- Cell := ExcelWindow.Cells(Line + 1, 1);
- Cell.Value := 'Tresc ' + Line;
- end;
-
- for column := 1 to ColumnCount do
- begin
- Cell := ExcelWindow.Cells(1, Column + 1);
- Cell.Value := 'Ups ' + Column;
- end;
-
- for Line := 1 to LineCount do
- for Column := 1 to ColumnCount do
- begin
- Cell := ExcelWindow.Cells(Line + 1, Column + 1);
- Cell.Value := Line + Column;
- end;
-
- Range := ExcelWindow.Range(ExcelWindow.Cells(1, 1),
- ExcelWindow.Cells(LineCount + 1, ColumnCount + 1));
-
- Range.Name := '╬ßδα±╞ⁿ─αφφ√⌡';
-
- Border := Range.Borders;
-
- Border.LineStyle := 1;
- Border.ColorIndex := 3;
-
- WorkSheet := WorkBook.Worksheets(1);
- Diagram := WorkSheet.ChartObjects;
- Diagram := Diagram.Add(5, 5 + Range.Top + Range.Height,
- Range.Width, Range.Height);
- MyDiagram := Diagram.Chart;
- MyDiagram.ChartWizard('Jupijajej ', -4102, 6, 1, 1, 1, 1, 'Ollleee');
- end;
-