on 2019 Apr 05 9:45 PM
Try to use the subject download function through VBA code:-
Function Download(module As String, subModule As String, subFolder As String, FileName As String, [_teamId As String]) As Byte()
Where is this Byte file saved? How to convert byte file into txt file and save into a designated file path?
Request clarification before answering.
Sorry, but looks like you are using very old epm client SP. In my current epm download is available in EPMAddInAutomation
And it's the correct way to download file.
How to save byte atray to file - easiest thing, why not to search Google yourself?
P.S. saving byte atray to file has no relation to EPM, it's a generic VBA knowledge.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
True, not hard to google to find answer on how to save byte into txt file, just need two steps 1. convert byte into string 2. Print to output file (can't use write which includes quotation mark). Code I used below achieves results expected:-
bytfile = objDMautomation.Download("DATAMANAGER", "DATAFILES", "", DL_FILE(I), "")
Strfile = StrConv(bytfile, vbUnicode)
Open UP_FILE For Output As #1
Print #1, Strfile
Close #1
yuhuangli
Have to repeat - using EPMAddInDMAutomation Download is a wrong approach! It's a not supported and not documented function.
If you try to use it with AO instead of standalone EPM client - it will not work!
Why not to use documented Download presented in EPM SP32????
New APIs to Manage Files on the Server
But why not to use another Download subroutine defined in FPMXLClient.EPMAddInAutomation:
Dim epm As New FPMXLClient.EPMAddInAutomation
epm.Download "C:\somefolder\ttt1.txt", "DATAMANAGER", "DATAFILES", "\", "acc1.txt"
It will download file directly to the local path!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"Where is this Byte file saved?" - in memory 🙂
Dim epmDM As New FPMXLClient.EPMAddInDMAutomation
Dim bytFile() as Byte
bytFile=epm.Download("DATAMANAGER", "DATAFILES", "\", "acc1.txt")
Then you can save Byte array to file...
P.S. Read my answer: https://answers.sap.com/questions/212643/epm-data-manager-download-data-vba.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 8 | |
| 6 | |
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.