(DOS Error -2147418111) WINOLE/1009 No exported method: LAN

(DOS Error -2147418111) WINOLE/1009 No exported method: LAN

Postby Horizon » Tue Nov 01, 2022 11:41 am

(DOS Error -2147418111) WINOLE/1009 No exported method: LANGUAGESETTINGS

Hi,

Excel 2016 is installed this computer. This error comes randomly in ToExcel() function. Normally there is not any error like this.

Any comment?

ICRA_LBT.prg
Code: Select all  Expand view  RUN
..
..
        aHataList := {}

        MyMsgMeter({|oMeter, oDlg, oSay1, oSay2|;
            Toplu_TEBLIGAT_Aktarma_Detay1(oMeter, oDlg, oSay1, oSay2, @aData1, aTumListe, oData)},;
            "Eşleştiriliyor. Lütfen Bekleyiniz")

        xbrowser aHataList slnum title "BULUNAMAYANLAR - HATALIST"   // Line 2064
..
..


Code: Select all  Expand view  RUN
Application
===========
   Compiler version: Harbour 3.2.0dev (r2104281802)
   FiveWin  version: FWH 22.06
   C compiler version: Microsoft Visual C 19.31.31107 (32-bit)
   Windows 10 64 Bits, version: 6.2, Build 9200

   Time from start: 0 hours 0 mins 44 secs
   Error occurred at: 01/11/2022, 14:18:48
   Error description: (DOS Error -2147418111) WINOLE/1009  No exported method: LANGUAGESETTINGS

Stack Calls
===========
   Called from:  => TOLEAUTO:LANGUAGESETTINGS( 0 )
   Called from: .\source\function\OLEFUNCS.PRG => EXCELLANGID( 181 )
   Called from: .\xbrowse.prg => SETEXCELLANGUAGE( 12577 )
   Called from: .\xbrowse.prg => TXBROWSE:TOEXCEL( 10660 )
   Called from: .\source\function\XBROWSER.PRG => (b)XBROWSE( 181 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 792 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 1083 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1847 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2135 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3680 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 307 )
   Called from: .\source\function\XBROWSER.PRG => XBROWSE( 293 )
   Called from: .\ICRA_LBT.prg => TOPLU_TEBLIGAT_AKTARMA( 2064 )
   Called from: .\TApplication.prg => TAPPLICATION:RUN( 312 )
   Called from: .\Master.prg => (b)DEFINE_RIBBON( 3165 )
   Called from: .\source\classes\MENU.PRG => TMENU:ACTIVATE( 1810 )
   Called from: .\source\classes\TRBTN.PRG => TRBTN:LBUTTONUP( 886 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1847 )
   Called from: .\source\classes\TRBTN.PRG => TRBTN:HANDLEEVENT( 1578 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3680 )
   Called from:  => WINRUN( 0 )
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1114 )
   Called from: .\TApplication.prg => TAPPLICATION:ACTIVATE( 1402 )
   Called from: .\Master.prg => MAIN( 389 )

System
======
   CPU type: Intel(R) Core(TM) i3-4160 CPU @ 3.60GHz 3592 Mhz
   Hardware memory: 16322 megs

   Free System resources: 90 %
        GDI    resources: 90 %
        User   resources: 90 %

   Windows total applications running: 6
      1 , C:\OBJEKT\IcraW\icraw.exe                                                                          
      2 , C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_a8625c
      3 DDE Server Window, C:\Windows\System32\ole32.dll                                                                      
      4 GDI+ Window (icraw.exe), C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.19041.1706_none_d94bc52be10975
      5 HideForm, C:\OBJEKT\IcraW\FrSystH.dll                                                                        
      6 Microsoft Text Input Application,                                                                                                    

Variables in use
================
   Procedure     Type   Value
   ==========================
   TOLEAUTO:LANGUAGESETTINGS
     Param   1:    O    Class: ERROR
   EXCELLANGID
     Local   1:    A    Len:    2
     Local   2:    U    
   SETEXCELLANGUAGE
     Local   1:    O    Class: TOLEAUTO
     Local   2:    A    Len:    6
     Local   3:    S    
   TXBROWSE:TOEXCEL
     Param   1:    O    Class: TOLEAUTO
   (b)XBROWSE
     Local   1:    U    
     Local   2:    U    
     Local   3:    A    Len:    9
     Local   4:    L    .T.
     Local   5:    U    
     Local   6:    U    
     Local   7:    O    Class: TXBROWSE
     Local   8:    O    Class: TOLEAUTO
     Local   9:    U    
     Local  10:    U    
     Local  11:    U    
     Local  12:    U    
     Local  13:    U    
     Local  14:    U    
     Local  15:    U    
     Local  16:    U    
     Local  17:    U    
     Local  18:    U    
     Local  19:    N    21
     Local  20:    U    
     Local  21:    U    
     Local  22:    U    
     Local  23:    U    
     Local  24:    A    Len:    0
     Local  25:    L    .F.
     Local  26:    A    Len:    0
     Local  27:    L    .T.
     Local  28:    U    
     Local  29:    N    0
     Local  30:    U    
     Local  31:    U    
     Local  32:    U    
     Local  33:    U    
   TBTNBMP:CLICK
     Param   1:    O    Class: TBTNBMP
   TBTNBMP:LBUTTONUP
   TCONTROL:HANDLEEVENT
     Param   1:    N    14
     Param   2:    N    15
     Param   3:    N    0
     Local   1:    L    .T.
     Local   2:    N    0
     Local   3:    S    
   TBTNBMP:HANDLEEVENT
     Param   1:    N    514
     Param   2:    N    0
     Param   3:    N    917519
     Local   1:    U    
   _FWH
     Param   1:    N    514
     Param   2:    N    0
     Param   3:    N    917519
   DIALOGBOXINDIRECT
     Param   1:    N    917519
     Param   2:    N    514
     Param   3:    N    0
     Param   4:    N    917519
     Param   5:    N    176
     Local   1:    O    Class: TBTNBMP
   TDIALOG:ACTIVATE
     Param   1:    N    9306112
     Param   2:    C    "€ Ï€       Ñ    B U L U N A M A Y A N L A R   -   H A T A L I S T        R    ÿÿ   ) «T B A R         1P    
  ½á µT X B R O W S E       "

     Param   3:    N    527000
     Param   4:    O    Class: TDIALOG
   XBROWSE
     Param   1:    U    
     Param   2:    U    
     Param   3:    B    {|| ... }
     Param   4:    L    .F.
     Param   5:    B    {|| ... }
     Param   6:    L    .T.
     Param   7:    U    
     Param   8:    U    
     Param   9:    U    
     Param  10:    U    
     Param  11:    U    
     Param  12:    L    .F.
     Param  13:    O    Class: TDIALOG
     Param  14:    U    
     Local   1:    N    527000
     Local   2:    S    
     Local   3:    O    Class: TDIALOG
   TOPLU_TEBLIGAT_AKTARMA
     Param   1:    A    Len:   21
     Param   2:    C    "BULUNAMAYANLAR - HATALIST"
     Param   3:    L    .F.
     Param   4:    U    
     Param   5:    U    
     Param   6:    U    
     Param   7:    L    .T.
     Param   8:    L    .F.
     Param   9:    U    
     Param  10:    C    "slnum"
     Param  11:    L    .F.
     Param  12:    L    .F.
     Local   1:    O    Class: TDIALOG
     Local   2:    O    Class: TBAR
     Local   3:    O    Class: TXBROWSE
     Local   4:    O    Class: TFONT
     Local   5:    O    Class: TFONT
     Local   6:    U    
     Local   7:    U    
     Local   8:    N    720.00
     Local   9:    N    270.00
     Local  10:    U    
     Local  11:    U    
     Local  12:    U    
     Local  13:    U    
     Local  14:    U    
     Local  15:    L    .T.
     Local  16:    U    
     Local  17:    N    1
     Local  18:    N    1
     Local  19:    L    .F.
     Local  20:    A    Len:    0
     Local  21:    L    .T.
   TAPPLICATION:RUN
     Local   1:    O    Class: TPUBLIC
     Local   2:    A    Len:   14
     Local   3:    A    Len:   14
     Local   4:    N    15
     Local   5:    C    "Toplu_TEBLIGAT_Aktarma"
     Local   6:    L    .F.
     Local   7:    A    Len:   14
   (b)DEFINE_RIBBON
     Param   1:    C    "Toplu_TEBLIGAT_Aktarma()"
   TMENU:ACTIVATE
     Param   1:    O    Class: TMENUITEM
   TRBTN:LBUTTONUP
     Param   1:    N    85
     Param   2:    N    93
     Param   3:    O    Class: TRBGROUP
     Param   4:    L    .F.
     Local   1:    N    0
     Local   2:    A    Len:    2
   TCONTROL:HANDLEEVENT
     Param   1:    N    39
     Param   2:    N    39
     Param   3:    N    0
     Local   1:    L    .T.
     Local   2:    L    .F.
     Local   3:    S    
   TRBTN:HANDLEEVENT
     Param   1:    N    514
     Param   2:    N    0
     Param   3:    N    2555943
     Local   1:    U    
   _FWH
     Param   1:    N    514
     Param   2:    N    0
     Param   3:    N    2555943
   WINRUN
     Param   1:    N    2555943
     Param   2:    N    514
     Param   3:    N    0
     Param   4:    N    2555943
     Param   5:    N    138
     Local   1:    O    Class: TRBTN
   TWINDOW:ACTIVATE
     Param   1:    N    527000
   TAPPLICATION:ACTIVATE
     Param   1:    C    "MAXIMIZED"
     Param   2:    U    
     Param   3:    U    
     Param   4:    U    
     Param   5:    B    {|| ... }
     Param   6:    U    
     Param   7:    B    {|| ... }
     Param   8:    B    {|| ... }
     Param   9:    U    
     Param  10:    U    
     Param  11:    U    
     Param  12:    U    
     Param  13:    U    
     Param  14:    U    
     Param  15:    U    
     Param  16:    U    
     Param  17:    B    {|| ... }
     Param  18:    U    
     Param  19:    U    
     Param  20:    L    .F.
     Local   1:    O    Class: TWINDOW
     Local   2:    U    
     Local   3:    U    
   MAIN
     Local   1:    O    Class: TAPPLICATION
     Local   2:    N    10526880
     Local   3:    O    Class: TFONT
     Local   4:    C    ""
     Local   5:    N    1632
     Local   6:    N    864
     Local   7:    N    1920
     Local   8:    N    1080

Linked RDDs
===========
   DBF
   DBFFPT
   DBFBLOB
   DBFCDX
   DBFNTX

DataBases in use
================

Classes in use:
===============
     1 ERROR
     2 HBCLASS
     3 HBOBJECT
     4 CHARACTER
     5 NUMERIC
     6 ARRAY
     7 SCALAROBJECT
     8 HASH
     9 HASH
    10 BLOCK
    11 TWINDOW
    12 TCONTROL
    13 TGET
    14 TFONT
    15 TCURSOR
    16 TPUBLIC
    17 TDIALOG
    18 TBRUSH
    19 TXIMAGE
    20 TSAY
    21 TMETER
    22 TREG32
    23 TCLIPBOARD
    24 TRECT
    25 TAPPLICATION
    26 TMYDATABASE
    27 TMYTABLE
    28 TMYTABLE_RKAYIT
    29 TMYTABLE_CERCEVE
    30 TMYTABLE_RLOG
    31 TMYTABLE_USERSN
    32 TMYTABLE_DEPARTMAN
    33 TMYTABLE_USERIL
    34 TMYTABLE_GUSYETKI
    35 TMYTABLE_USGRUP
    36 TMYTABLE_WBOLUM
    37 TMYTABLE_PARAM
    38 TMYTABLE_MASTER
    39 TMYTABLE_INDEX
    40 TMYTABLE_RINIFILE
    41 TMYTABLE_BLOG
    42 TMYTABLE_BINIFILE
    43 TMYTABLE_BKAYIT
    44 TMYTABLE_USGRUPG
    45 TMYTABLE_AVUKAT
    46 TMYTABLE_REFNO2
    47 TMYTABLE_BTIPI
    48 TMYTABLE_DOVIZ
    49 TMYTABLE_FAIZ1
    50 TMYTABLE_FAIZ2
    51 TMYTABLE_FAIZ3
    52 TMYTABLE_FAIZ4
    53 TMYTABLE_FAIZ5
    54 TMYTABLE_FAIZ6
    55 TMYTABLE_FAIZ7
    56 TMYTABLE_FAIZ8
    57 TMYTABLE_FAIZ9
    58 TMYTABLE_FAIZ10
    59 TMYTABLE_FAIZ11
    60 TMYTABLE_FAIZ12
    61 TMYTABLE_FAIZ13
    62 TMYTABLE_FAIZ14
    63 TMYTABLE_FAIZ15
    64 TMYTABLE_FAIZ16
    65 TMYTABLE_FAIZ17
    66 TMYTABLE_FAIZ18
    67 TMYTABLE_FAIZ19
    68 TMYTABLE_FAIZTAN
    69 TMYTABLE_UYAPIL
    70 TMYTABLE_UYAPILC
    71 TMYTABLE_DOVIZKUR
    72 TMYTABLE_SORUBANK
    73 TMYTABLE_ICDAIRE
    74 TMYTABLE_DTUPDATE
    75 TMYTABLE_MTIPI
    76 TMYTABLE_BANKA
    77 TMYTABLE_BANKAM
    78 TMYTABLE_3SAHIS
    79 TMYTABLE_KIME
    80 TMYTABLE_GOREV
    81 TMYTABLE_GOREVGRB
    82 TMYTABLE_GOREVOZ
    83 TMYTABLE_MULKTIPI
    84 TMYTABLE_EVRAK
    85 TMYTABLE_EVRNEREDE
    86 TMYTABLE_EVRSONDURUM
    87 TMYTABLE_ADRESLER
    88 TMYTABLE_KTFORM
    89 TMYTABLE_KSTIPI
    90 TMYTABLE_GGUNLUK
    91 TMYTABLE_BELGEKAT
    92 TMYTABLE_MUVEKKIL
    93 TMYTABLE_PMAHKEME
    94 TMYTABLE_TAPULAR
    95 TMYTABLE_DOSALTTUR
    96 TMYTABLE_MUVYET
    97 TMYTABLE_MUVADR
    98 TMYTABLE_MUVBANK
    99 TMYTABLE_MUVVEK
   100 TMYTABLE_MUVYAZ
   101 TMYTABLE_MUVSOZ
   102 TMYTABLE_MMASRAF
   103 TMYTABLE_MMASRAFD
   104 TMYTABLE_SABLONRP
   105 TMYTABLE_BAROIL
   106 TMYTABLE_MAHKONU
   107 TMYTABLE_MHBELGE
   108 TMYTABLE_KTDILEK
   109 TMYTABLE_KTDILEKA
   110 TMYTABLE_AJANDAKT
   111 TMYTABLE_USERSNEK
   112 TMYTABLE_P_ADLIYE
   113 TMYTABLE_RESTATIL
   114 TMYTABLE_BAVUKAT
   115 TMYTABLE_BUSYETKI
   116 TMYTABLE_TTIPI
   117 TMYTABLE_VEKILUCR
   118 TMYTABLE_OVEKILUC
   119 TMYTABLE_VEKALET
   120 TMYTABLE_VEK_YA
   121 TMYTABLE_VEKISIM
   122 TMYTABLE_UC_BOLUM
   123 TMYTABLE_NOTER
   124 TMYTABLE_VEKBELGE
   125 TMYTABLE_ICRAKART
   126 TMYTABLE_ALACAK
   127 TMYTABLE_BORC
   128 TMYTABLE_TELEFON
   129 TMYTABLE_PLAKA
   130 TMYTABLE_PLAKA1
   131 TMYTABLE_PLAKA2
   132 TMYTABLE_GMENKUL
   133 TMYTABLE_GMENKUL1
   134 TMYTABLE_GMENKUL2
   135 TMYTABLE_MIRASB
   136 TMYTABLE_BORGOR
   137 TMYTABLE_MUVGOR
   138 TMYTABLE_MAHGOR
   139 TMYTABLE_TEBLIGAT
   140 TMYTABLE_BADRES
   141 TMYTABLE_BGUNLUK
   142 TMYTABLE_OTAHSIL
   143 TMYTABLE_HACIZ
   144 TMYTABLE_HMALLAR
   145 TMYTABLE_YAPILAN
   146 TMYTABLE_MENKUL
   147 TMYTABLE_YAPISLR
   148 TMYTABLE_MAHKEME
   149 TMYTABLE_DBMEMO
   150 TMYTABLE_KONU
   151 TMYTABLE_EKBILGI
   152 TMYTABLE_AKTIFAV
   153 TMYTABLE_TAAHHUT
   154 TMYTABLE_TALIMAT
   155 TMYTABLE_RAPOROZ
   156 TMYTABLE_AJANDA
   157 TMYTABLE_POSTA
   158 TMYTABLE_HAVALE
   159 TMYTABLE_ODEME
   160 TMYTABLE_LOCKDB
   161 TMYTABLE_TAAHMAS
   162 TMYTABLE_TAAHDET
   163 TMYTABLE_COLL1
   164 TMYTABLE_COLL2
   165 TMYTABLE_SMSSABLON
   166 TMYTABLE_BALACAK
   167 TMYTABLE_MASRAF
   168 TMYTABLE_MASRAFD
   169 TMYTABLE_ICBELGE
   170 TMYTABLE_COLLA1
   171 TMYTABLE_COLLA2
   172 TMYTABLE_MENKULM
   173 TMYTABLE_MENKULM1
   174 TMYTABLE_MENKULM2
   175 TMYTABLE_CHBELGE
   176 TMYTABLE_EKTAHSIL
   177 TMYTABLE_VKBELGE
   178 TMYTABLE_ICVEKUC
   179 TMYTABLE_ZAMAN
   180 TMYTABLE_GUNLUKKT
   181 TMYTABLE_MAHTARAF
   182 TMYTABLE_MAHDURUS
   183 TMYTABLE_MHDELIL
   184 TMYTABLE_MHTANIK
   185 TMYTABLE_BBANKA
   186 TMYTABLE_VEBELGE
   187 TMYTABLE_ICNOTLAR
   188 TMYTABLE_MAASHCZ
   189 TMYTABLE_MAASHCZT
   190 TMYTABLE_OFISGOR
   191 TOB_PARAMETRE
   192 TCERCEVE
   193 FRREPORTMANAGER
   194 TMYFASTREPORT
   195 FRPRINTOPTIONS
   196 FRPREVIEWOPTIONS
   197 FRENGINEOPTIONS
   198 FRREPORTOPTIONS
   199 WIN_OLEAUTO
   200 TOLEAUTO
   201 TIPCLIENT
   202 TIPCLIENTHTTP
   203 TURL
   204 TICON
   205 TMENU
   206 TMENUITEM
   207 TRIBBONBAR
   208 TRPANEL
   209 TRBGROUP
   210 TRBTN
   211 TMSGBAR
   212 TMSGITEM
   213 TTIMER
   214 TGROUP
   215 TCHECKBOX
   216 GET
   217 TCLIPGET
   218 TBTNBMP
   219 TDSAY
   220 TPANEL
   221 TSCROLLMSG
   222 TYK_CORE
   223 TWDETAY
   224 TBUTTON
   225 TBUTTONBMP
   226 TBAR
   227 TXBROWSE
   228 TXBRWCOLUMN
   229 TSCROLLBAR
   230 TXMLDOCUMENT
   231 TXMLNODE
   232 TXMLITERATOR
   233 TXMLITERATORSCAN
   234 TSTRUCT

Memory Analysis
===============
      1353 Static variables

   Dynamic memory consume:
      Actual  Value:   18284544 bytes
      Highest Value:   18284544 bytes

Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: (DOS Error -2147418111) WINOLE/1009 No exported method: LAN

Postby Otto » Tue Nov 01, 2022 12:30 pm

Hi,
What language is that. Possibly this is not installed in EXCEL?
But I have not seen this error either.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6340
Joined: Fri Oct 07, 2005 7:07 pm

Re: (DOS Error -2147418111) WINOLE/1009 No exported method: LAN

Postby karinha » Tue Nov 01, 2022 1:38 pm

Maybe:

Code: Select all  Expand view  RUN

/*

   A. American format: "999,999,999.99"

   E. European format: "999.999.999,99"

   I. Indian   format: "99,99,999.99"

   */


   fwNumFormat( 'E', .t. )  // Italian format
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7834
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: (DOS Error -2147418111) WINOLE/1009 No exported method: LAN

Postby karinha » Tue Nov 01, 2022 1:43 pm

http://forums.fivetechsupport.com/viewtopic.php?f=16&t=14704

https://github.com/manuelcalerosolis/Gestool/blob/master/prg/Xbrowse.102.prg

* Enhancements: Class TXBrowse, thanks to Anser!

1) Used TRY CATCH when HARBOUR Compiler is used to Create an Excel Object
Method ToExcel() Line 4834
Method ToCalc() Line 5074
Fuction SetExcelLanguage() Line 5869

2) Value of the Static Variable nxlLangID set to 0 in ToCalc() Line 5042

3) Value of the Static Variable nxlLangID set to nil when ever there is an exit from ToCalc().
Line No's 5048, 5055, 5068, 5078 and 5349

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7834
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: (DOS Error -2147418111) WINOLE/1009 No exported method: LAN

Postby Horizon » Tue Nov 01, 2022 1:51 pm

karinha wrote:http://forums.fivetechsupport.com/viewtopic.php?f=16&t=14704

https://github.com/manuelcalerosolis/Gestool/blob/master/prg/Xbrowse.102.prg

* Enhancements: Class TXBrowse, thanks to Anser!

1) Used TRY CATCH when HARBOUR Compiler is used to Create an Excel Object
Method ToExcel() Line 4834
Method ToCalc() Line 5074
Fuction SetExcelLanguage() Line 5869

2) Value of the Static Variable nxlLangID set to 0 in ToCalc() Line 5042

3) Value of the Static Variable nxlLangID set to nil when ever there is an exit from ToCalc().
Line No's 5048, 5055, 5068, 5078 and 5349

Regards, saludos.


Thank you very much for answer. I use last version of fwh 22.06.

The error is not given every time run this code. After trying run code again, there may not be given error. It gives randomly.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: (DOS Error -2147418111) WINOLE/1009 No exported method: LAN

Postby nageswaragunupudi » Tue Nov 01, 2022 3:37 pm

This error comes randomly

Surprising.

Anyway, we will try to make the function ExcelLangID() in olefuncs.prg safer.
We will get back on this subject.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: (DOS Error -2147418111) WINOLE/1009 No exported method: LAN

Postby karinha » Tue Nov 01, 2022 4:32 pm

Master Nages, sorry for the sincerity, but it is impossible to understand what this function does.

Maestro Nages, disculpe la sinceridad, pero es imposible entender qué hace esta función.

* New: Functions in olefuncs.prg
ExcelLangID() --> nExcelLangID
ExcelLang() --> en,es,fr,pt,de,it
ExcelTranslate( cFunc ) --> Translated function
Dbf2ExcelNumFormat( cPicture ) -> cExcelPic

https://forums.fivetechsupport.com/~fivetec1/forums/viewtopic.php?f=16&t=27548

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7834
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: (DOS Error -2147418111) WINOLE/1009 No exported method: LAN

Postby artu01 » Wed Dec 07, 2022 4:40 pm

Mr. Rao any news about this.

nageswaragunupudi wrote:
This error comes randomly

Surprising.

Anyway, we will try to make the function ExcelLangID() in olefuncs.prg safer.
We will get back on this subject.
fwh 17.12, harbour 3.2.0, pelles C, bcc7, Ms-Sql
artu01
 
Posts: 400
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Re: (DOS Error -2147418111) WINOLE/1009 No exported method: LAN

Postby Horizon » Tue Jan 10, 2023 10:05 am

Hi,

Any news?
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: (DOS Error -2147418111) WINOLE/1009 No exported method: LAN

Postby betoncu » Sun Jan 15, 2023 2:02 pm

Hakan may be this helps. I have modified OleFuncs.Prg as below.
I have put double slash and my name to the lines that I have midified (i.e //birol)

Code: Select all  Expand view  RUN
/*
*
*  OleFuncs.Prg
*
*  For common use in other modules
*
*/


#include "fivewin.ch"
#include "adodef.ch"

#ifdef __XHARBOUR__
   #xtranslate hb_StrToHex( [<c,...>] )        => StrToHex( <c> )
#endif

//----------------------------------------------------------------------------//

static nExcelLangID, nExcelLangNo
static cDecimalSeparator := '.', cThousandsSeparator := ',', cListSeparator := ','

//----------------------------------------------------------------------------//

static lExcel, lWord, lCalc

//----------------------------------------------------------------------------//

function FWGetOleObject( cApp, lInstalled )  // @lInstalled

   local oObj

   if lInstalled != .f.
      TRY
         oObj  := GetActiveObject( cApp )
      CATCH
         TRY
            oObj  := CreateObject( cApp )
         CATCH
         END
      END
      lInstalled  := ( oObj != nil )
   endif

return oObj

//----------------------------------------------------------------------------//

function WinWordObj(); return FWGetOleObject( "Word.Application",   @lWord  )
function ExcelObj();   return FWGetOleObject( "Excel.Application",  @lExcel )
function SunCalcObj(); return FWGetOleObject( "com.sun.star.ServiceManager", @lCalc )

//----------------------------------------------------------------------------//

function GetExcelRange( cBook, cSheet, acRange, lOpened )

   local oExcel, oBook, oSheet, oRange

   if ( oExcel := ExcelObj() ) != nil
      if ( oBook := GetExcelBook( cBook, @lOpened ) ) != nil
         TRY
            if Empty( cSheet )
               oSheet   := oBook:ActiveSheet
            else
               oSheet   := oBook:WorkSheets( cSheet )
            endif
            if ValType( acRange ) == 'A'
               oRange   := oSheet:Range( oSheet:Cells( acRange[ 1 ], acRange[ 2 ] ), ;
                                         oSheet:Cells( acRange[ 3 ], acRange[ 4 ] ) )
            elseif ValType( acRange ) == 'C'
               oRange   := oSheet:Range( acRange )
            else
               oRange   := oSheet:UsedRange
            endif
         CATCH
         END
      endif
   endif

return oRange

//----------------------------------------------------------------------------//

function GetExcelBook( cBook, lOpened )

   local oExcel, oBook, cBookX
   local c, n, nBooks

   lOpened     := .f.
   if ( oExcel := ExcelObj() ) != nil
      if Empty( cBook )
         oBook := oExcel:ActiveWorkBook
      else
         cBook    := TrueName( cBook )
         if File( cBook )
            cBookX   := cBook
            cBook := Upper( cFilePath( cBook ) + cFileNoExt( cBook ) )
            nBooks   := IfNil( oExcel:WorkBooks:Count(), 0 )
            for n := 1 to nBooks
               c  := oExcel:WorkBooks( n ):FullName
               if cBook == Upper( cFilePath( c ) + cFileNoExt( c ) )
                  return oExcel:WorkBooks( n )
               endif
            next n
            TRY
               oBook    := oExcel:WorkBooks:Open( cBookX )
               lOpened  := .t.
            CATCH
            END
         endif
      endif
   endif

return oBook

//----------------------------------------------------------------------------//

function ExcelBookSaveAs( oBook, cSaveAs, lShow ) // [lShow default .f.]

   local cExt  := Upper( cFileExt( cSaveAs ) )
   local nSaveAs

   DEFAULT lShow := .f.

   nSaveAs  := If( cExt == "HTM" .or. cExt == "HTML", 44, If( cExt == "CSV", 62, nil ) )
   // 44 = xlHtml, 6 = xlCSV, 62 = xlCSVUTF8

   cSaveAs     := TrueName( cSaveAs )
   WITH OBJECT oBook
      :Application:DisplayAlerts := .f.
      TRY
         if cExt == "PDF"
            :ExportAsFixedFormat( 0, cSaveAs, AdoDefault(), AdoDefault(), ;
                 AdoDefault(), AdoDefault(), AdoDefault(), lShow )
         elseif !Empty( nSaveAs )
            :SaveAs( cSaveAs, nSaveAs )
            if lShow
               if nSaveAs == 44
                  HTMLVIEW( cSaveAs )
               else
                  WinExec( "notepad.exe " + cSaveAs )
               endif
            endif
         else
            :SaveAs( cSaveAs )
         endif
      CATCH
         cSaveAs  := ""
      END
      :Close()
   END

return cSaveAs

//----------------------------------------------------------------------------//

function FW_ToggleDeskTop()

   local oShell

   oShell   := TOleAuto():New( "Shell.Application" )
   oShell:ToggleDeskTop()

return nil

//----------------------------------------------------------------------------//

function ExcelLangID()

   local oExcel
   local aID   := { ;
   { 1033, 2057, 10249, 4105, 9225, 14345, 6153, 8201, 5129, 13321, 7177, 11273, 12297 }, ;
   { 3082,1034,11274,16394,13322,9226,5130,7178,12298,17418,4106,18442,;
                     58378,2058,19466,6154,15370,10250,20490,21514,14346,8202 }, ;
   { 1036,2060,11276,3084,9228,12300,15372,5132,13324,6156,14348,58380,8204,10252,4108,7180 }, ;
   { 1046, 2070 }, ;
   { 1031,3079,5127,4103,2055 }, ;
   { 1040, 2064 }, ;
   { 1055 } } //birol
   // 1 English, 2 Spanish, 3 French, 4 Portugese, 5 German, 6 Italian, 7 Turkish   //birol

   if nExcelLangID == nil
      oExcel         := ExcelObj()
      nExcelLangID   := If( oExcel == nil, 0, oExcel:LanguageSettings:LanguageID( 2 ) )
      nExcelLangNo   := AScan( aID, { |a| AScan( a, nExcelLangID ) > 0 } )
      TRY
         cDecimalSeparator    := oExcel:International[ 3 ]
         cThousandsSeparator  := oExcel:International[ 4 ]
         cListSeparator       := oExcel:International[ 5 ]
      CATCH
      END
   endif

return nExcelLangID

//----------------------------------------------------------------------------//

function ExcelLang()

   if nExcelLangNo == nil
      ExcelLangID()
   endif

return { 'en', 'es', 'fr', 'pt', 'de', 'it', 'tr' }[ Max( 1, nExcelLangNo ) ]  //birol

//----------------------------------------------------------------------------//

function ExcelTranslate( cFunc )

   local cRet, nAt, cName

   // 1 English, 2 Spanish, 3 French, 4 Portugese, 5 German, 6 Italian, 7 Turkish      birol
   local aTranslates := { ;
   { "TRUE",      "VERDADERO",   "VRAI",        "VERDADEIRO", "WAHR",          "VERO",       "DOĞRU", }, ;
   { "FALSE",     "FALSO",       "FAUX",        "FALSO",      "FALSCH",        "FALSO",      "YANLIŞ", }, ;
   { "SUM(",      "SUMA(",       "SOMME(",      "SOMA(",      "SUMME(",        "SOMMA(",     "TOPLA(", }, ;
   { "SUBTOTAL(", "SUBTOTALES(", "SOUS.TOTAL(", "SUBTOTAL(",  "TEILERGEBNIS(", "SUBTOTALE(", "ALTTOPLAM(" }, ;
   { ',',         ';',           ';',           ';',          ';',              ';',         ';' } ;
   }

   if nExcelLangNo == nil
      ExcelLangID()
   endif
   cFunc       := Upper( cFunc )
   cRet        := cFunc
   if nExcelLangNo > 1 .and. nExcelLangNo <= 7   //birol
      // Translation required
      cName    := cFunc
      if ( nAt := At( '(', cFunc ) ) > 0
         cName    := Left( cFunc, nAt )
      endif
      if ( nAt := AScan( aTranslates, { |a| a[ 1 ] == cName } ) ) > 0
         cRet     := StrTran( cFunc, cName, aTranslates[ nAt, nExcelLangNo ] )
      endif
   elseif nExcelLangNo != 1
      if cRet == "TRUE";  cRet := "1=1"; endif
      if cRet == "FALSE"; cRet := "1=0"; endif
   endif

   if cListSeparator != ','
      cRet     := StrTran( cRet, ',', cListSeparator )
   endif

return cRet

//----------------------------------------------------------------------------//

function Dbf2ExcelNumFormat( cFmt )

   local cRet     := '##0'

   if nExcelLangNo == nil
      ExcelLangID()
   endif

   if ! Empty( cFmt )
      if Left( cFmt, 1 ) == '@'
         cFmt     := LTrim( AfterAtNum( ' ', cFmt, 1 ) )
      endif
      do while ' ' $ cFmt
         cFmt     := Trim( BeforAtNum( ' ', cFmt ) )
      enddo
      if '.' $ cFmt
         cRet     += ( cDecimalSeparator + Replicate( '0', Len( AfterAtNum( '.', cFmt ) ) ) )
      endif
      if ',' $ cFmt
         cRet     := '#' + cThousandsSeparator + cRet
      endif
   endif

return cRet

//----------------------------------------------------------------------------//

function ExcelSeparators(); return { cDecimalSeparator, cThousandsSeparator, cListSeparator }

//----------------------------------------------------------------------------//
// OPEN OFFICE FUNCTIONS : ( Mr. ANSER.KK )
//----------------------------------------------------------------------------//

function GetPropertyValue( oService, cName, xValue )

   local oArg

   oArg := oService:Bridge_GetStruct( "com.sun.star.beans.PropertyValue" )
   oArg:Name  := cName
   oArg:Value := xValue

return oArg

//----------------------------------------------------------------------------//

function ConvertToOoURL(cPath)

    local cURL

    cURL:= StrTran( cPath, "\", "/" )   // change backslashes to forward slashes.
*    cURL:= StrTran( cURL, "
:", "|" )  // X: not allowed for driveletter, use X| instead
    cURL:= StrTran( cURL, "
", "%20") // Space in file filename
    cURL = "
file:///" + cURL

return cURL

//----------------------------------------------------------------------------//

// Notice: Not needed for Harbour 3.4 as it has been included in Harbour 3.4
/*
#ifndef __XHARBOUR__

#define WIN_VT_ERROR                10
#define WIN_DISP_E_PARAMNOTFOUND ( 0x80020004 )

function OleDefaultArg()

return   __oleVariantNew( WIN_VT_ERROR, WIN_DISP_E_PARAMNOTFOUND )

#endif
*/


//----------------------------------------------------------------------------//

function OfficeExtractImage( cSrcFile, lReExtract )

   local oWord, oDoc, cRet := ""
   local aFiles, cThumb, nAt, cExt, cPath

   cExt        := Lower( cFileExt( cSrcFile ) )
   if ( nAt := AScan( { "docx", "xlsx", "pptx" }, { |c| c == cExt } ) ) == 0
      return ""
   endif

   DEFAULT lReExtract := .f.

   cSrcFile    := TrueName( cSrcFile )
   cRet        := cFileSetExt( cSrcFile, { "emf", "wmf", "jpeg" }[ nAt ] )
   if .not. lReExtract .and. File( cRet )
      return cRet
   endif

   cRet     := ""
   aFiles   := hb_GetFilesInZip( cSrcFile )
   if ! Empty( aFiles )
#ifdef __XHARBOUR__
      if ( nAt := AScan( aFiles, { |c| "\thumbnail." $ lower( c ) } ) ) > 0
#else
      if ( nAt := AScan( aFiles, { |c| "/thumbnail." $ lower( c ) } ) ) > 0
#endif
         cThumb   := aFiles[ nAt ]
      endif
   endif

   if ! Empty( cThumb )
      cPath       := cFilePath( cSrcFile )
#ifndef __XHARBOUR__
      cThumb      := CharRepl( "/", cThumb, "\" )
#endif
      FErase( cPath + cFileNoPath( cThumb ) )
      hb_UnZipFile( cSrcFile, nil, .f., nil, cPath, cThumb )
      cRet     := cFileSetExt( cSrcFile, cFileExt( cThumb ) )
      cThumb   := cPath + cFileNoPath( cThumb )
      FErase( cRet )
      FRENAME( cThumb, cRet )

      if !File( cRet )
         // failure
         cRet     := "
"
      endif
   endif

return cRet

//----------------------------------------------------------------------------//


#ifndef __XHARBOUR__

//
// Problems with HB_UnzipFile() of Harbour
// Files in subfolder are not unzipped unless the subfolder exists
// 3rd parameter has no effect and always unzips to subfolder
//
// This is a condensed and modified version of the function from ziparc.prg
// for the purpose of extracting thumbnails. This is not a full replacement
//

static function hb_UnzipFile( cSrcZip, bUpdate, lWithPath, cPassword, cPath, cUnzip, bProgress )

   local lRetVal := .f.

   local hUnzip, nErr, cZipName
   local hHandle, nSize, nLen, dDate, cTime
   local cBuffer := Space( 32768 )

   if .not.  Empty( hUnzip := hb_unzipOpen( cSrcZip ) )
      if ValType( cUnZip ) == 'A'
         cUnZip   := cUnzip[ 1 ]
      endif

      if Empty( cPath )
         cPath := hb_FNameDir( cSrcZip )
      endif

      cPath := hb_DirSepAdd( cPath )

      nErr := hb_unzipFileFirst( hUnzip )
      do while nErr == 0
         if hb_unzipFileInfo( hUnzip, @cZipName, @dDate, @cTime,,,, @nSize ) == 0
            if ( Upper( CharRepl( '/', cZipName, '' ) ) == Upper( CharRepl( '/', cUnZip, '' ) ) )
               if ( hHandle := FCreate( cPath + cFileNoPath( CharRepl( '/', cUnzip, '' ) ) ) ) != -1 //F_ERROR
                  if hb_unzipFileOpen( hUnzip, cPassword ) == 0 //UNZ_OK
                     do while ( nLen := hb_unzipFileRead( hUnzip, @cBuffer, hb_BLen( cBuffer ) ) ) > 0
                        FWrite( hHandle, cBuffer, nLen )
                     enddo
                     hb_unzipFileClose( hUnzip )
                     FClose( hHandle )
                     hb_FSetDateTime( cPath + cZipName, dDate, cTime )
                     lRetVal  := .t.
                  endif
               endif
               EXIT
            endif
         endif
         nErr := hb_unzipFileNext( hUnzip )
      enddo
      hb_unzipClose( hUnzip )
   endif

return lRetVal

#endif

//----------------------------------------------------------------------------//


#ifdef __XHARBOUR__
function HarbourNew();return .f.
#else
function HarbourNew()

   static lNew

   if lNew == nil
      lNew  := LEFT( AFTERATNUM( "
(r", Version() ), 4 ) >= "1801"
   endif

return lNew
#endif

//----------------------------------------------------------------------------//

function xlRangeValue( oRange )

   local aValue   := oRange:Value

   if !HarbourNew()
      aValue   := ArrTransposeQ( aValue )
   endif

return aValue

//----------------------------------------------------------------------------//

function WMIService()

   static oWMI

   local oLocator

   if oWMI == nil

      oLocator   := CREATEOBJECT( "
wbemScripting.SwbemLocator" )
      oWMI       := oLocator:ConnectServer()

   endif

return oWMI

//----------------------------------------------------------------------------//

Birol Betoncu
birol.betoncu@gmail.com
Using Harbour, FWH 19.05, BCC7
User avatar
betoncu
 
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)

Re: (DOS Error -2147418111) WINOLE/1009 No exported method: LAN

Postby Horizon » Mon Jan 16, 2023 9:08 am

Thank you very much Birol.

I will try it immediately.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 69 guests