| |
|
|
Christof Neuß | Hi,
has already time someone with the DLL LibXL befasst? so can directly on Exceldateien (too xlsx and xlsm) grab and these Edit.
Files open and Texts reinschreiben can I already, but I verzweifle momentarily on whom functions, a number in a cell write or a worth read. the can still not so heavy his.
is for me interestingly, there some users of Programs Excel none More pub installs and have The edit over ActiveX not any more functions.
thanks...!!! |
|
|
| |
|
|
|
H.Brill | if so already the integral works : what standing because in the Doku from the DLL ? How are because The Übergabe - Parameter ?
Something like fails usually, if The Übergabe the Parameter wrong is. wants hot, whether tappt im dunkeln by reference or by worth transfer go.
with whom numbers white I now not very, whether there Profan too by Ref. commit. if need be times the To übergebene number in a area write and this then transfer. the same counts too at reading. |
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 03/15/16 ▲ |
|
|
|
|
RGH | Hakllo,
the trouble is here, that The function to that write the numerischen values one double (64 bit) as worth (byVal) expects. In 32-bit-XProfan are but any Parameter with one API-appeal 32-bit wide. with of/ one small amendment-procedure can we but one double on two LongInts distribute and these transfer. of/ one API-function is it alike whether The 64 bit as one Parameter or as two Parameter überegeben go. it must hold 64 bit his, those come:
Declare lever hLibxl, book, sheet
hLibxl = ImportDLL("libxl.dll", "")
set("CallConv","CDECL")
proc xlSheetWriteNumD
parameters lever s, longint x,y , double d, lever f
declare longint d1, d2, memory md
dim md, 8' One double has 8 byte = 64 bit
md = addr(d)' the double becomes on the area gemappt
d1 = long(md,0)' the first four Bytes come to d1
d2 = long(md,4)' The second four Bytes come to d2
xlSheetWriteNumA(s, x, y, d1, d2, f)
endproc
cls
book = xlCreateBookCA()
IF book
sheet = xlBookAddSheetA(book, "sheet1", 0)
IF sheet
xlSheetWriteStrA(sheet, 2, 2, "Hello, World!", 0)
xlSheetWriteNumD(sheet, 3, 1, 1000, 0)
ENDIF
xlBookSaveA(book, "example.xls")
MessageBox("File Written", "", 0)
xlBookReleaseA(book)
ENDIF
WaitInput
END
so functions it! there at Reading the same trouble auftaucht, ought to one numerische values as String read and then with VAL transfiguring.
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 | 03/15/16 ▲ |
|
|
|
|
Christof Neuß | this is Yes time again genial
hardly goes one 'ne Std. joggen, around the Hirn again something To ventilate, already finds one here a Info, the weiterhilft. THANK YOU Roland. the has already time well worked.
unfortunately be I in Use with DLLs still laity and verzweifle moreover...
Schau' time:
Declare lever hLibxl, book, sheet
hLibxl = ImportDLL("libxl.dll", "")
set("CallConv","CDECL")
Var File$="Test1.xls"
Var red$=""
proc xlSheetWriteNumD
parameters lever s, LONGint x,y , double d, lever f
declare longint d1, d2, memory md
dim md, 8' One double has 8 byte = 64 bit
md = addr(d)' the double becomes on the area gemappt
d1 = long(md,0)' the first four Bytes come to d1
d2 = long(md,4)' The second four Bytes come to d2
xlSheetWriteNumA(s, x, y, d1, d2, f)
endproc
cls
book = xlCreateBookCA()
xlBookLoadA(book, File$)
IF book
'sheet = xlBookAddSheetA(book, "sheet1", 0)
sheet = xlBookGetSheetA(book, 0)
IF sheet
xlSheetWriteStrA(sheet, 2, 2, "Hello!", 0)
xlSheetWriteNumD(sheet, 3, 1, 1000, 0)
red$=xlSheetReadStrA(sheet, 9,0)
Print red$
ENDIF
xlBookSaveA(book, "Test1.xls")
xlBookReleaseA(book)
ENDIF
Print "FERTIG!"
WaitInput
END
red$ becomes of course equips, but I sustain something like How a Pointer, or? How I'm going because so circa? Hab' already the a or others ausprobiert, but I find not out.
and at Zahlenauslesen as Text - I fundamentally understand - position the question, whether The function xlSheetReadStr() with of/ one "Zahlenzelle" at all functions.
already time again large THANK YOU... |
|
|
| |
|
|
|
H.Brill | so far I the see, becomes there another stature with zurückgegeben :
Reads a string and its stature from cell
Müßtest You time try, whether there one area not rather would :
If the DLL-function one Nullbyte behind whom String setting, is it Yes simply, with String$(area#, 0) on whom String To come.
Roland : might it to Übergabe of numbers not too double(N&) or QuadInt take ? The are still 64bit wide.
otherwise probier it time with area#. there get one one indeed with Float(V, A) a 64bit - worth. |
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 03/15/16 ▲ |
|
|
|
|
Christof Neuß | Hi,
Texts and Formeln read can I now already time. the goes relatively simply with
with numbers functions the but unfortunately not. |
|
|
| |
|
|
|
H.Brill | Nimm but rather time reaches :
Gelesen& is a normal LongInt. the works of course supra, because both The variables-address contain, is but not so of Roland beabsichtigt and can thoroughly time fehlschlagen.
Mach rather :
what yet goes, is a Pointer.
with numbers can the neither functions. here must one The Bereichsfunktionen Float(V,A) or Long(V, A) using. The String$() - function reads as long as, To either one Nullbyte comes or To ans the end the Bereichs. and Zahlenwerte having nunmal no Nullbyte. |
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 03/15/16 ▲ |
|
|
|
|
Christof Neuß | Merci for Info. OK, hab' s on reaches umgestellt. in the STR-area everything How before and - unfortunately - in Zahlenbereich. it not working. alike, I too Try...
so geht's not...
... with ZahlGelesen&=Long(red#,0) geht's neither. I get only Fehlermeldungen.
|
|
|
| |
|
|
|
RGH | to that String-area: it must not dimensioniert go, since the API-function this in this drop Done.
to that Reading numbers: here's the trouble, that too the Return Value of/ one API-function in the 32-bit-XProfan only one 32-bit-worth (LongInt, area, lever or double) his can, take off The entire windows-API zutrifft. The function the DLL supply but with numerischen Values a double (64 bit) back, what with XProfan now times not goes. AUch the Auislesen as String not working, since the function, as too in the Documentation standing, NULL returns, if in the cell no String is
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 | 03/15/16 ▲ |
|
|
|
|
Christof Neuß | Hello Roland,
thanks for Info. Schade. but then need I do not More To try. momentarily need I tats. only The Lesefunktion for Strings. the reicht Yes then. unfortunately can ich's then not for others Applications benefit. |
|
|
| |
|
|
|
RGH | there's a Solution, The but not integrally aufwandsarm is:
In Delphi a Wrapper-DLL write, The then with Single operates and the double as String returns, etc. I have for me time so a DLL written, The to Time only The functions from my example contains. with the opportunity have I The Aufrufkonvention too of CDECL to STDCALL gewandelt. so sees the example now so from and functions correct:
Declare lever hLibxl, book, sheet, stature, memory red
hLibxl = ImportDLL("prlibxl.dll", "")
cls
book = xlCreateBookCA()
IF book
sheet = xlBookAddSheetA(book, "sheet1", 0)
IF sheet
xlSheetWriteStrA(sheet, 2, 2, "Hello, World!", 0)
xlSheetWriteNumA(sheet, 3, 1, single(1000), 0)
red = xlSheetReadStrA(sheet, 2, 2, 0)
Print String $(red, 0)
red = xlSheetReadNumA(sheet, 3, 1, 0)
Print String $(red, 0)
ENDIF
xlBookSaveA(book, "example.xls")
MessageBox("File Written", "", 0)
xlBookReleaseA(book)
ENDIF
WaitInput
END
with WriteNum becomes The function single() akin, so The number 1000 not as Integer transfer becomes. one could but too 1000.0 write or directly a variable the Type SINGLE transfer.
it would means machbar, a Wrapper-DLL To write, The any functions the Original-DLL contains. another Possibility would, a Wrapper-DLL only for functions To write, The double ls Parameter receive and/or double zurückliefern. the would something less costly.
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 | 03/16/16 ▲ |
|
|
|
|
Christof Neuß | Hello Roland,
How You already write... "nicht integrally aufwandsarm". and the counts not only for, The additional DLL-To release, separate too for my into years gekommene application, The I quite rebuild should. The problem is u.a., I on native functions for a couple speedy Dateifunktionen zurückgreife and here yet with XPSE compiliere. The against is not so integrally friend with some XProfan X3-functions and so lead one to that others... would have been I now 100 paying customers would it me neither detain, the - relatively small - Program integrally new To write. but there are only a handful customers and it'll probably soon integrally tuned go. I verzichte now a Plausibilitätsprüfung and then läuft's too without Excelaufruf through.
the Topic "Zugriff on Exceldateien" engage me but moreover. Perhaps I'm going time on XLware To and question, whether it a Solution gives (z.B. Num-values as String To reading).
ONE reason for me seinerzeit with XProfan to begin was too, because of the Mächtigkeit the Language, almost no further DLL bring into action To must. If the so stay should, must I others Opportunities find.
for the time being many Thanks all, The here mitgedacht and helped having. |
|
|
| |
|
|