Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "KOL";
Текущий архив: 2007.04.01;
Скачать: [xml.tar.bz2];

Вниз

Передача в Excel   Найти похожие ветки 

 
Maloric   (2006-07-09 14:56) [0]

Здраствуйте, уже весь форум перерыл, немогу избавиться от ошибки, есть ли у кого рабочий пример?
1. uses KolComObj
var XLApp:OleVariant;
begin
  Kol.OleInit;
  XLApp:=CreateOleObject("Excel.Application");//ERROR
...

Возвращает пустую ошибку.
2.uses Variants, ComObj;
var XLApp:OleVariant;
begin
  Kol.OleInit;
  XLApp:=CreateOleObject("Excel.Application");//ERROR
...

Не узнает строку CreateOleObject?
Пробовал и с заменой системных модулей и без нее.
uses Windows, Messages, ShellAPI, KOL, KOLEcmListEdit ,Variants {$IFNDEF KOL_MCK}, mirror, Classes, Controls, mckControls, mckObjs, Graphics,  mckCtrls,
 mckEcmListEdit, ComObj{$ENDIF (place your units here->)};


 
Maloric ©   (2006-07-09 16:11) [1]

Заменил fakeVariants на Variants из шестого делфи, все заработало,
только файл стал весить на ~50кб больше.

p.s. Я и не знал, что в KOL теперь встроили fakeVariants.


 
thaddy   (2006-07-09 18:26) [2]

the reasons for the fakevariants were:

1. from D6 the variants implementations were (badly) rewritten and added a lot of code.
2. the variants unit was included in the uses clause by some code even if it wasn"t needed.

The best solution is to use D4 or D5 with KOL COM code (recommended!).
The second solution is to use the variants unit from Borland, but that will add 70K to your programs.


 
Maloric ©   (2006-07-09 21:10) [3]


> The best solution is to use D4 or D5 with KOL COM code (recommended!
> ).
> The second solution is to use the variants unit from Borland,
>  but that will add 70K to your programs.

Thank for the answer, Thaddy!
It is necessary to agree with 70 kb



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

Форум: "KOL";
Текущий архив: 2007.04.01;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.44 MB
Время: 0.039 c
15-1173576885
eXPell
2007-03-11 04:34
2007.04.01
Концепты от LADA


3-1168348619
novill
2007-01-09 16:16
2007.04.01
IB 7.5 Как хр. процедуре в переменнной типа date обнулить время?


1-1170616649
flaxe
2007-02-04 22:17
2007.04.01
Bitmap в ICO


15-1173156404
eXPell
2007-03-06 07:46
2007.04.01
Эх, раз...


2-1173536396
DemonP
2007-03-10 17:19
2007.04.01
создать приложение из 2х процессов со своим окном





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский