Forum | | | | 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 |
| | | | |
| | |
=== SORRY!!!! === having whom Posting somehow under Includes prepares. wars I there neither More lane, or? therefore here once more.
no trouble, soon may be its Topics too discretionary move, I faith "Löschen" would have You whom Posting under Includes however can. (otherwise must I again ran) have dortigen Posting simply "entfernt". ^^
to that code can I little say, naja, I see "unbekannte" Escapesequenzen. ^^ |
| | | | |
| | Christof Neuß | there be I once more.
Topic Done. I habs through try solve can. sometimes helps simply a interval. thereafter GEHTS rather. whom Thread here setting still someone on "erledigt", or must/can I the somewhere make?
alas Yes, one interested me already yet. get the XProfan-Program really a feedback from the abgesetzten ocx-command and operates first then moreover or go The simply into billiardcue geschmissen? background the question: Do I have a "Sleep" install, if I z.B. a large Exceldatei with "Save" Save let and that some Time lasts or can I me the save?
Wens interested, here's the code: CompileMarkSeparation
Proc DatenKopieren
Excel öffnen
ocxInit()
VAR Datei1$ =$ProgDir+"GGBVSDialog.xls"
VAR Datei2$ =$ProgDir+"GGBVSDialog_Auswertung.xlsx"
VAR Excel& =ocxCreate("Excel.Application")
ocxPut(Excel&,"DisplayAlerts",0)
VAR Workbooks&=ocxGet(Excel&,"Workbooks")
Exceldatei der Bank öffnen GGBVSDialog.xls
VAR NewBook1&=ocxMethod(Workbooks&,"Open",Datei1$)
VAR Sheet1&=ocxGet(NewBook1&,"Sheets","BankDaten")
VAR Range1&=ocxGet(Sheet1&,"Range","B6:F100")
Exceldatei der GGB öffnen GGBVSDialog_Auswertung.xlsx
VAR NewBook2&=ocxMethod(Workbooks&,"Open",Datei2$)
VAR Sheet2&=ocxGet(NewBook2&,"Sheets","BankDaten")
VAR Range2&=ocxGet(Sheet2&,"Range","B6")
SetText Elemente&[3], GetText$(Elemente&[3])+"
Exceldateien wurden geöffnet..."
BankDaten kopieren
ocxMethod(Sheet1&,"Activate")
ocxMethod(Range1&,"Copy")
ocxMethod(Sheet2&,"Activate")
ocxMethod(Range2&,"PasteSpecial",)
SetText Elemente&[3], GetText$(Elemente&[3])+"
Bankdaten wurden kopiert..."
KAP_Fiku kopieren
Sheet1&=ocxGet(NewBook1&,"Sheets","KAP_Fiku")
Range1&=ocxGet(Sheet1&,"Range","A1:AA1000")
Sheet2&=ocxGet(NewBook2&,"Sheets","KAP_Fiku")
Range2&=ocxGet(Sheet2&,"Range","A1")
ocxMethod(Sheet1&,"Activate")
ocxMethod(Range1&,"Copy")
ocxMethod(Sheet2&,"Activate")
ocxMethod(Range2&,"PasteSpecial",)
SetText Elemente&[3], GetText$(Elemente&[3])+"
FIKU-Daten wurden kopiert..."
KAP_Priku kopieren
Sheet1&=ocxGet(NewBook1&,"Sheets","KAP_Priku")
Range1&=ocxGet(Sheet1&,"Range","A1:AA1000")
Sheet2&=ocxGet(NewBook2&,"Sheets","KAP_Priku")
Range2&=ocxGet(Sheet2&,"Range","A1")
ocxMethod(Sheet1&,"Activate")
ocxMethod(Range1&,"Copy")
ocxMethod(Sheet2&,"Activate")
ocxMethod(Range2&,"PasteSpecial",)
SetText Elemente&[3], GetText$(Elemente&[3])+"
PRIKU-Daten wurden kopiert..."
KAP_betreut kopieren
Sheet1&=ocxGet(NewBook1&,"Sheets","KAP_betreut")
Range1&=ocxGet(Sheet1&,"Range","A1:AA1000")
Sheet2&=ocxGet(NewBook2&,"Sheets","KAP_betreut")
Range2&=ocxGet(Sheet2&,"Range","A1")
ocxMethod(Sheet1&,"Activate")
ocxMethod(Range1&,"Copy")
ocxMethod(Sheet2&,"Activate")
ocxMethod(Range2&,"PasteSpecial",)
SetText Elemente&[3], GetText$(Elemente&[3])+"
KAP-Daten Betreuer/Berater wurden kopiert..."
Exceldateien und Excel schließen
ocxPut(NewBook1&,"Saved",1)
ocxMethod(NewBook1&,"Close")
Sheet2&=ocxGet(NewBook2&,"Sheets","Inhalt")
Range2&=ocxGet(Sheet2&,"Range","A1")
ocxMethod(Sheet2&,"Activate")
ocxMethod(NewBook2&,"Save")
ocxPut(NewBook2&,"Saved",1)
ocxMethod(NewBook2&,"Close")
ocxMethod(Excel&,"Quit")
ocxRelease(Range1&,Sheet1&,NewBook1&)
ocxRelease(Range2&,Sheet2&,NewBook2&)
ocxRelease(WorkBooks&,Excel&)
ocxDeInit()
SetText Elemente&[3], GetText$(Elemente&[3])+"
Exceldateien gespeichert und Excel beendet..." lass=s4 href='./../../function-references/XProfan/endproc/'>endproc
Thank you. |
| | | | |
| | | to that OCX-Topic white I do not, whether there one "Ready-" or "Busy-State" gives. circa Topic as Done To Mark, simply left supra on the Button "Thema: ..." clicking and [X] active-tick Remove and Save. ^^ |
| | | | |
| | Uwe ''Pascal'' Niemeier | Hello Christof!
get the XProfan-Program really a feedback from the abgesetzten ocx-command and operates first then moreover or go The simply into billiardcue geschmissen? background the question: Do I have a "Sleep" install, if I z.B. a large Exceldatei with "Save" Save let and that some Time lasts or can I me the save?
the comes on The function on. After of my experience works most modes asynchron, d.h. the Hauptprogramm runs moreover, during The function yet operates. the can when saving large and/or several Files Problemen lead. therefore there How iF already said often a State- or Busy-request.
One möglicher Workaround would, to put down the Write command in a loop size of the file To überprüfen; get one during the Schreibvorganges none grabbed (FileSize= -1; Fehlermeldungen switch off), is the File not yet ready. If one The Sollgröße the File knows, can to the write too Verify, whether The File entire is and possibly whom process repeat.
As I said, the depends of verwendeten ActiveX-Objekt (Excel, HTML, zipper, db etc.) ex. in the Zweifelsfall means try!
HTH Pascal |
| | | | |
| | Christof Neuß | Hello Pascal,
thanks for Notes. are helpful. That the FileSize must I time try. yet I had one Sleep installed, but since The Files different big are and/or the system too time faster and times slower is, verschenkt one Time or one is still not sure, that everything stored is. |
| | | | |
| | | Hello Christof,
I get with the row VAR NewBook1&=ocxMethod(Workbooks&,"Open",File1$) always a Error Message CallMethod Error $-7FF5FC14-2146827284 unbekannter Error
and thereafter stürtzt the program ex...
surroundings: WIN7, XPROFAN12ß14, counts but too for XPROFAN11.2 |
| | | | |
| | | is naturally pity, that The in Codes angegebenen Excel-Files not uploaded get z.B. with Demodaten. @Guest: can You Please a kompletten code with dazugehöriger Excel-File Upload so the crash plainer nachvollziebar is? |
| | | | |
| | Stephan Sonneborn | Hi David,
I wars... I had forget, me anzumelden and then was the mail already drin...
means, the Source is the, whom Christof posted has. except for The data. the are 2 Own Test-Files equal Inhalts.
CompileMarkSeparation $H Windows.ph
$H ocx3a.ph
$I ocx3a.inc
Proc DatenKopieren
'Excel öffnen
ocxInit()
VAR Datei1$ =$ProgDir+"Test.xls"
VAR Datei2$ =$ProgDir+"test2.xls"
VAR Excel& =ocxCreate("Excel.Application")
ocxPut(Excel&,"DisplayAlerts",0)
VAR Workbooks&=ocxGet(Excel&,"Workbooks")
'Exceldatei der Bank öffnen GGBVSDialog.xls
VAR NewBook1&=ocxMethod(Workbooks&,"Open",Datei1$)
VAR Sheet1&=ocxGet(NewBook1&,"Sheets","BankDaten")
VAR Range1&=ocxGet(Sheet1&,"Range","B6:F100")
'Exceldatei der GGB öffnen GGBVSDialog_Auswertung.xlsx
VAR NewBook2&=ocxMethod(Workbooks&,"Open",Datei2$)
VAR Sheet2&=ocxGet(NewBook2&,"Sheets","BankDaten")
VAR Range2&=ocxGet(Sheet2&,"Range","B6")
SetText Elemente&[3], GetText$(Elemente&[3])+"Exceldateien wurden geöffnet..."
'BankDaten kopieren
ocxMethod(Sheet1&,"Activate")
ocxMethod(Range1&,"Copy")
ocxMethod(Sheet2&,"Activate")
ocxMethod(Range2&,"PasteSpecial",)
SetText Elemente&[3], GetText$(Elemente&[3])+"Bankdaten wurden kopiert..."
'KAP_Fiku kopieren
Sheet1&=ocxGet(NewBook1&,"Sheets","KAP_Fiku")
Range1&=ocxGet(Sheet1&,"Range","A1:AA1000")
Sheet2&=ocxGet(NewBook2&,"Sheets","KAP_Fiku")
Range2&=ocxGet(Sheet2&,"Range","A1")
ocxMethod(Sheet1&,"Activate")
ocxMethod(Range1&,"Copy")
ocxMethod(Sheet2&,"Activate")
ocxMethod(Range2&,"PasteSpecial",)
SetText Elemente&[3], GetText$(Elemente&[3])+"FIKU-Daten wurden kopiert..."
'KAP_Priku kopieren
Sheet1&=ocxGet(NewBook1&,"Sheets","KAP_Priku")
Range1&=ocxGet(Sheet1&,"Range","A1:AA1000")
Sheet2&=ocxGet(NewBook2&,"Sheets","KAP_Priku")
Range2&=ocxGet(Sheet2&,"Range","A1")
ocxMethod(Sheet1&,"Activate")
ocxMethod(Range1&,"Copy")
ocxMethod(Sheet2&,"Activate")
ocxMethod(Range2&,"PasteSpecial",)
SetText Elemente&[3], GetText$(Elemente&[3])+"PRIKU-Daten wurden kopiert..."
'KAP_betreut kopieren
Sheet1&=ocxGet(NewBook1&,"Sheets","KAP_betreut")
Range1&=ocxGet(Sheet1&,"Range","A1:AA1000")
Sheet2&=ocxGet(NewBook2&,"Sheets","KAP_betreut")
Range2&=ocxGet(Sheet2&,"Range","A1")
ocxMethod(Sheet1&,"Activate")
ocxMethod(Range1&,"Copy")
ocxMethod(Sheet2&,"Activate")
ocxMethod(Range2&,"PasteSpecial",)
SetText Elemente&[3], GetText$(Elemente&[3])+"KAP-Daten Betreuer/Berater wurden kopiert..."
'Exceldateien und Excel schließen
ocxPut(NewBook1&,"Saved",1)
ocxMethod(NewBook1&,"Close")
Sheet2&=ocxGet(NewBook2&,"Sheets","Inhalt")
Range2&=ocxGet(Sheet2&,"Range","A1")
ocxMethod(Sheet2&,"Activate")
ocxMethod(NewBook2&,"Save")
ocxPut(NewBook2&,"Saved",1)
ocxMethod(NewBook2&,"Close")
ocxMethod(Excel&,"Quit")
ocxRelease(Range1&,Sheet1&,NewBook1&)
ocxRelease(Range2&,Sheet2&,NewBook2&)
ocxRelease(WorkBooks&,Excel&)
ocxDeInit()
SetText Elemente&[3], GetText$(Elemente&[3])+"Exceldateien gespeichert und Excel beendet..."
endproc
cls
datenkopieren
wa t
end
BTW: How can really code as such mark? somehow come I with the new surroundings not really clear. too the Quote works not... |
| | | Schöne Grüße aus Wittgenstein von Stephan
Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz | 10/01/10 ▲ |
| |
| | Jörg Sellmeyer | simply whom code in [ code] here the code [ /code ] "einwickeln". naturally without The space. and the Quote shining objectively not To functions. |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 10/01/10 ▲ |
| |
| | | [offtopic]I have yet no Toolbar for Beitragseditoren manufactured (becomes naturally nachgeholt), therefore standing one to Time bisl thick there ahahahber I have it time gepackt ne Page produce where too any commands gelistet go can [...] .[/offtopic] |
| | | | |
| | Uwe ''Pascal'' Niemeier | Hi Stephan!
ought to eigendlich klappen... are you sure, that the Files really found go? carrying still time To Testzwecken The Paths directly in whom code one. $PROGDIR supply Yes whom way to that Ordner with Interpreter or Runtime, not to the Ordner, in the the code lying.
SeeYou Pascal |
| | | | |
|
AnswerTopic-Options | 29.449 Views |
Themeninformationenthis Topic has 7 subscriber: |