English
Forum

Excel Data copy of ocx

 
- Page 1 -



Christof
Neuß
Hi,

need time again a Anschubser. It's all right therefore, I a area a Exceldatei in a others Exceldatei copy would like. really integrally simply, but...

I habs time so probiert, but already at "Select" jumping me the thing out.
Oh, äähh... The here are naturally supra indicated, otherwise GEHTS Yes none.
 $H windows.ph
 $H ocx3a.ph
 $I ocx3a.inc

Proc DatenKopieren

    Excel öffnen
    ocxInit()
    VAR File1$   =$PROGDIR+"GGBVSDialog.xls"
    VAR File2$   =$PROGDIR+"GGBVSDialog_Auswertung.xlsx"
    VAR Excel&    =ocxCreate("Excel.Application")
    VAR Workbooks&=ocxGet(Excel&,"Workbooks")
    Exceldatei the bank öffnen GGBVSDialog.xls
    VAR NewBook1&=ocxMethod(Workbooks&,"Open",File1$)
    VAR Sheet1&=ocxGet(NewBook1&,"Sheets","BankDaten")
    VAR brat1&=ocxGet(Sheet1&,"Range","B6:F100")
    Exceldatei the GGB öffnen GGBVSDialog_Auswertung.xlsx
    VAR NewBook2&=ocxMethod(Workbooks&,"Open",File2$)
    VAR Sheet2&=ocxGet(NewBook2&,"Sheets","BankDaten")
    VAR brat2&=ocxGet(Sheet1&,"Range","B6")
    BankDaten copy
    ocxMethod(Sheet1&,"Activate")
    ocxMethod(Sheet1&,"Select","B6:F100")
    The Messagebox ought to only Show, whether the Select-commands functions has,
    means not with Error Message there rausgesprungen is. so far comes the thing
    but quite not.
    MessageBox("Select gelaufen","Meldung",0)
    ocxMethod(Sheet1&,"Copy")
    ocxMethod(Sheet2&,"Select","B6")
    ocxMethod(Sheet2&,"PasteSpecial",)
    Exceldateien and Excel close
    ocxPut(NewBook1&,"Saved",1)
    ocxMethod(NewBook1&,"Close")
    ocxMethod(NewBook1&,"Save")
    ocxPut(NewBook2&,"Saved",1)
    ocxMethod(NewBook1&,"Close")
    ocxMethod(Excel&,"Quit")
    ocxRelease(brat1&,Sheet1&,NewBook1&)
    ocxRelease(brat2&,Sheet2&,NewBook2&)
    ocxRelease(WorkBooks&,Excel&)
    ocxDeInit()

endproc


Oh, The Sheets are both Files same aufgebaut. On Formatierungen etc. need one means no regard take. with the first File go The data at customers abgeholt, in the second are additional The Auswertungsblätter.

thanks
 
Win10 16 GB RAM
04/14/10  
 



 
- Page 2 -



Stephan
Sonneborn
Hello Pascal,

No, unfortunately wars the neither.

i'm of course on this Uralt-ploy reingefallen, but the wars not...

159 kB
Kurzbeschreibung: OCX-Error Message
Hochgeladen:10/02/10
Downloadcounter374
Download
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
10/02/10  
 




Uwe
''Pascal''
Niemeier
Hi Stephan!

I thought, the Error would CallMethod Error $-7FF5FC14-2146827284 unbekannter Error  ?
The let itself namely by a incorrect way understand and exit at tried Open the xls on.
where very exit because the Error you on?

SeeYou
Pascal
 
10/02/10  
 




Stephan
Sonneborn
Hi Pascal,

I ought to me Perhaps too time whom whole Source standing: there watts on tables verwiesen, The not whom Testdaten drin were...
clear, that then Error come...

now runs fehlerfrei through, copies but not yet. I look me now again your Help-File on.
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
10/03/10  
 




Stephan
Sonneborn
Hi Pascal,

I Have yet ne question: how can I The latest Line of/ one Excel-Mappe read?
in VBA would the

the should still somehow with ocxget() weg...
If Sheet& The actually Mappe is, then should the still irgenwie ocx(Sheet&, "UsedRange",...) hot... have You ne idea?
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
10/03/10  
 




Uwe
''Pascal''
Niemeier
Hi Stephan!

whom VBA-expression Sheet.UsedRange.Rows.Count must You for ocx in single Objects decompose:
var Sheet&=ocxGet(NewBook&,"Sheets","Seite1")
var UsedRange&=ocxGet(Sheet&,"UsedRange")
var Rows&=ocxGet(UsedRange&,"Rows")
print ocxGet(Rows&,"Count")

BTW: the Sheet self has already one Row-Unterobjekt, but the contains apparently The theoretical  available Zeilenanzahl.

what me yet noticed is: The Excel-application becomes by the Release on the End of program unfortunately not exits, separate remaining invisible in memory hang.
here one vollständiges example with Workaround for:
window 600,600
 $H windows.ph
 $H ocx3a.ph
 $I ocx3a.inc
ocxInit()
var File$="C:1TestTest.xls"'---Existierende File
var Excel&=ocxCreate("Excel.Application")
var ExcelWnd&=ocxGet(Excel&,"Hwnd")'--Window of Excel (even if not visible)
'ocxPut(Excel&,"Visible",1)'--To Testzwecken
var Workbooks&=ocxGet(Excel&,"Workbooks")
var NewBook&=ocxMethod(Workbooks&,"Open",File$)
var Sheet&=ocxGet(NewBook&,"Sheets","Seite1")'--scheduler "Seite1" must present his
var UsedRange&=ocxGet(Sheet&,"UsedRange")
var Rows&=ocxGet(UsedRange&,"Rows")
print ocxGet(Rows&,"Count")
ocxRelease(Rows&,UsedRange&,Sheet&,NewBook&,WorkBooks&,Excel&)
ocxDeInit()
sendmessage(ExcelWnd&,16,0,0)'--WM_CLOSE on Excel
waitinput

Related to the copy hab' I time with own Files angetestet; ought to too klappen.

HTH
Pascal
 
10/04/10  
 




Stephan
Sonneborn
Hello Pascal,

many Thanks for your Help. now Have I The Lines read can. I attempt me now at times whom Tabellennamen within of/ one File...
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
10/04/10  
 




Stephan
Sonneborn
Hello Pascal,

Gibts really differences zw. Excel 97 and 2003 in reference on OCX?
I Have here ne Testumgebung only with Excel 97 and running constantly on Error on.

In example. $8002006 -2147352570 with the row
ExcelWnd&  = ocxGet(Excel&,"Hwnd")

time ne generelle question: in the ocx3a.inc are with the ocxGET-function only 2 Parameter indicated. reads The function nevertheless "Seite1From?
var Sheet&=ocxGet(NewBook&,"Sheets","Seite1")
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
12/08/10  
 




Uwe
''Pascal''
Niemeier
Hi Stephan!


Gibts really differences zw. Excel 97 and 2003 in reference on OCX?
I Have here ne Testumgebung only with Excel 97 and running constantly on Error on.


i'd time say: Yes
so very know I not from, but I think time, that too Makros and Skripte not always abwärtskompatibel are, because newer Office-versions command/functions include, The in older even are missing.
there become You you well into jeweiligen Functions einarbeiten must.


time ne generelle question:
in the ocx3a.inc are with the ocxGET-function only 2 Parameter indicated.
reads The function nevertheless "Seite1From?


Jepp! any further Parameter go within "ocxGet" to procedure "ocxPutParams" durchgereicht.
about so:
window 500,200

proc Test2'-----------------------------------

    print &(1),&(2),&(3)

endproc'--------------------------------------

proc Test1'-----------------------------------

    Test2

endproc'--------------------------------------

Test1(1,2,3)
waitkey

admittedly not very elegant, especially since Roland this behaviour already with the next Profan-Version tip can
The processing of variables vaguely Type (with ActiveX ambulation and Gäbe) is yet 'ne large Schwachstelle; the goes yet on the simplest over procedure-Parameter, because there worth and type quasi separated gehandhabt go.

HTH
Pascal
 
12/09/10  
 




Stephan
Sonneborn
Hello Pascal,

I Have again Completed: ocx and Excel. with ocxDEInit() smears me Profan ex. can You you a rhyme on it make? I Have in the ocx3a.inc The Proc ocxrelease as cause (the call-appeal in the particular) fixes.

enclosed too one Image the Error Message.


64 kB
Hochgeladen:06/02/11
Downloadcounter339
Download
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
06/02/11  
 




Uwe
''Pascal''
Niemeier
Hi Stephan!

yet running it still? what have you got because changed / new installed?

with ocxDeInit() go any to the Time yet vorhandenen Objektpointer automatically released, because tappt im dunkeln on ocxRelease() weitergereicht go. One möglicher Error would, that of/ one this Pointer in anybody point null is.

You work yet with XProfan 11.2? One ähnliches trouble trod namely with the vorletzten Version of X2 on, because at Reading the ocx-internen list one falser worth determined wurde; though yielded the a vaguely Error and no Access violation...

You could you times the Objektliste Show let:
...
clearlist
movehandletolist(ocxList&)
listbox$("Objekte",1)
ocxDeInit()
...

a ungültigen worth recognize one mostly on it, that it To squat is.

hold me on the ongoing!
Pascal
 
06/02/11  
 




Stephan
Sonneborn
Uwe ''Pascal'' Niemeier (02.06.11)
yet running it still? what have you got because changed / new installed?


the I had me too demand. really nothing besonderes. anyway nothing, what with with the ocx-routines To do had. only a couple coloured Edits...

Uwe ''Pascal'' Niemeier (02.06.11)
You work yet with XProfan 11.2? One ähnliches trouble trod namely with the vorletzten Version of X2 on, because at Reading the ocx-internen list one falser worth determined wurde; though yielded the a vaguely Error and no Access violation...


I work with X2. me was only noticed, I yet with the 12.00.058it Beta worked having and having then The actually X2it as Interpreter used.
but that the the Error was, was I do not immediate clear. first as I time a Exe the program (funktionstüchtig) as Interpreter-File uses having, fell the Groschen: it had objectively on the actually X2it Version lying!

then must I well first with the middle-aged Beta as Interpreter and Runtime for OCX-Rogramme stay...

my actually versions are:
Runtime: 12.0.0.226
Interpreter: 12.0.0.221
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
06/02/11  
 




RGH
Hi,
The actually Version is X2.0a and was all Subscription-Customers shipped!
Runtime and Interpreter having The interne Version 12.0.1.0!

(ought to The Mail with you not arrived his, mail me Mail and You sustain bypassing mail!)

(BTW: with JDS is ex today only these actually Version available.)

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
06/02/11  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

29.437 Views

Untitledvor 0 min.
Langer04/02/17
Uwe Lang07/22/16
RudiB.11/19/15
Klaus Ernst03/03/15
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie