I'm trying to call a prg already working into a small exe that will be called from modharbour.
This prg reads a lot of informations in several tables and the write this strings inside an excel file, using the clipboard for pasting the datas.
The problem is that if I don't have a window or a dialog I cannot use the tclipboard class because it gives error saying this :
- Code: Select all Expand view RUN
Application
===========
Path and name: C:\fw\excel_export.exe (32 bits)
Size: 1.755.648 bytes
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 15/05/2021, 15:15:48
Error description: Error BASE/1004 Class: 'NIL' has no exported method: HWND
Args:
[ 1] = U
Stack Calls
===========
Called from: => HWND(0)
Called from: CLIPBRD.PRG => (b)TCLIPBOARD:TCLIPBOARD(0)
Called from: => TCLIPBOARD:OPEN(0)
Called from: MAIN.PRG => MAIN(133)
and this are few lines with the code that doesn't work.
- Code: Select all Expand view RUN
oClip := TClipBoard():New()
oClip:Clear()
oClip:SetText( cText )
oExcel:SetPos('A'+ALLTRIM(STR(F)) )
oExcel:Paste()
oClip:End()
Is there a possibility to make this ?
Thanks a lot.
Massimo