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

Ошибка Undeclared identifier: CreateOleObject    Найти похожие ветки 

← →
Mr_Jack   (2005-01-20 18:23) [0]

вот кусок кода проги,незнаю вроде вы всё верно,а ошибка :Undeclared identifier: "CreateOleObject",в строке омеч звездой.
var
               
 Vals: Variant;
 MSExcel: Variant;

 rows,Cells:integer;  
begin

 try
   Screen.Cursor := crHourGlass;
   Rows:= 10;
   Cells:= 12;  
   Vals := VarArrayCreate([0, Rows, 0, Cells], varVariant);
   try
    *** MSExcel := CreateOleObject("Excel.Application");***

   except
     raise Exception.Create("Ошибка Excel");
   end;

   MSExcel.Application.EnableEvents := False;
   MSExcel.WorkBooks.Add("test.xls");
   MSExcel.Range[MSExcel.Cells[1,1], MSExcel.Cells[Rows, Cells]].Value := Vals;
   // Vals := XL.Range[XL.Cells[1,1], XL.Cells[Rows, Cells]].Value;
   XL.Visible := True;

 finally
     Screen.Cursor := crDefault;
 end;
end;
МОЖЕТ Я ГДЕ-ТО ЧТО-ТО не объявил?


← →
Poirot ©   (2005-01-20 18:25) [1]

Логично! Видимо в uses надо прописать что-то, что скажет где искать CreateOleObject


← →
begin...end ©   (2005-01-20 18:25) [2]

> Mr_Jack   (20.01.05 18:23)

> МОЖЕТ Я ГДЕ-ТО ЧТО-ТО не объявил?

Может. ComObj, например.



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

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



Память: 0.45 MB
Время: 0.035 c
1-1106487768
Axeman
2005-01-23 16:42
2005.02.06
Internet explorer


1-1105985683
Ермак
2005-01-17 21:14
2005.02.06
TForm::OnShow


1-1106739791
MadGhost
2005-01-26 14:43
2005.02.06
как в TMemo прокрутить кекст вниз?


1-1105772482
Александр1
2005-01-15 10:01
2005.02.06
Работа с Word


14-1106020502
Чеширский_Кот
2005-01-18 06:55
2005.02.06
"Губит людей не пиво...




   Наверх