Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello:
I have to read an excel file attached to a mail in a QlikView document.
I have well configurated de connector, and I'm able to read all the tables included on the conector but when I try to use the tables MessageGetAttachmentAsText (or Binary) I get the data in an unreadable format.
I have been trying some differents formats on script, getting unreadable data or this error:
Error: File extdata.cpp, Line 2348
MailboxIMAPConnector_GetAttachmentAsText:
LOAD
*
FROM
(qvx)
Could you help me, please ?
I have attached some pictures to show you that the connector is working
Thank you
Joaquín
Steve, could you write here a TargetPath syntax sample ?
It requires a URL encoded version of where you want to write your file. I have a sub to do the URL encoding.
sub Encode(vEncodeMe, vEncoded)
let vEncoded = replace(replace(replace(replace(replace(replace(replace(replace(vEncodeMe, ':', '%3a'), '/', '%2f'), '?', '%3f'), '=', '%3d'), '\', '%5c'), '@', '%40'), ' ', '+'), '_', '%5f');
end sub
let vTargetFolder = 'c:\myfolder\myfile.xlsx';
call Encode(vTargetFolder, vTargetURL);
[$(vConnector)&table=MessageDownloadAttachment&Server=$(vServer)&SSL=$(vSSL)&Port=$(vPort)&Username=$(vUserName)&Password=$(vPassword)&MessageID=$(vUID)&AttachmentFileName=$(vFileURL)&TargetPath=$(vTargetURL)]
I think all the other parts are present and correct in your query.
Steve
The LOAD sentence ignores the TargetPath clause and do the same as before
Hi - Could you confirm the QWC version you are using?
Also - if possible, could you turn on the browser developer tools and see if there are any errors reported which might hint at why the parameter isn't showing for you?
In any case - I would expect the AsBinary table to work here - if you can connect to me over this site I could try and arrange a webex to take a look at your setup.
Hi Chris:
This is the QWC Connector Version: 1.0.1.21949
I've requested to Systems Departament they upgrade it, then I will try again and let you know about new results
By the way, Binary works as bad as Text
Thanks for your colaboration
Hi Chris & Steve:
Finally it works without upgrade QWC
As Steve wrote before "I would always do this as a two step thing. Write the attachment to a file first and then read from that file." ...
First step is MessageDownloadAttachment this download (from the mail server) the attach to a local folder and creates a record in the sript table MessageDownloadAttachment with a field Status filled 'OK'
Second step is upload the attached file to script a load * from .xlsx sentece
I was doing wrong the script and I wasn't able to see it
Thanks you very much for your colaboration
Joaquín
Hi Joaquín,
Glad it is working. Thanks for confirming back.
Cheers,
Steve