Вниз
Скачать: CL | DM;

excel   Найти похожие ветки 

← →
bambina ©   (2003-01-23 11:43) [0]

chto-to vidimo ne zakrivaet xls...
procedure TF_Hauptmenu.FormCreate(Sender: TObject);
var i,R: Integer;
E,Worksheet: Variant;
s,t1,t2,t3,t4,t5,t6,u,v: String;
begin
E:= CreateOleObject("Excel.Application");
E.WorkBooks.open("D:\Irina\psc\excel\KTR_TAB.xls",true);
WorkSheet:= E.ActiveSheet;
R:=WorkSheet.UsedRange.Rows.Count;

s := "INSERT INTO KTR(Bezeichnung, K


← →
Игорь Шевченко ©   (2003-01-23 12:23) [1]

unit main;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;

type
TForm1 = class(TForm)
ListBox1: TListBox;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation
uses
ComObj;

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);
var
I, J, Rows, Cols: Integer;
E, Rng: Variant;
S: String;
begin
E := CreateOleObject("Excel.Application");
E.WorkBooks.open("D:\test.xls",true);
J := E.WorkBooks[1].WorkSheets[1].Rows.Count;
Rng := E.WorkBooks[1].WorkSheets[1].UsedRange;
Rows := Rng.Rows.Count;
Cols := Rng.Columns.Count;
ShowMessageFmt("Used rows=%d, used columns=%d", [Rows, Cols]);
for i := 2 to J do begin
S := E.WorkBooks[1].WorkSheets[1].Cells[i,1];
if S = "" then
Break;
ListBox1.Items.Add(S);
end;
E.Quit;
E := NULL;
end;

end.



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.011 c
14-5150
pumba
2003-01-17 13:55
2003.02.03
Новосибирские удальцы.


1-5034
GrEG
2003-01-22 12:36
2003.02.03
COM/DCOM


7-5313
Zelius
2002-11-19 11:56
2003.02.03
CreateToolhelp32Snapshot возвращает не все процессы!!!


3-4803
Rustik
2003-01-15 13:29
2003.02.03
Не вытаскиваются данные из DBText с предыдущей формы


1-4940
error 2k
2003-01-25 15:38
2003.02.03
ShellChangeNotifier




   Наверх