Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Have requirement is that need ti import .msg files in to qlikview and create some reports.
Can any one help me out.
can you upload a sample file.
Hi Nitin,
Like I am trying to upload the mails we received in to the qlikview and do some analytics on the same.
1. Like mail subject area
2. Body
3. To Address
4. From Address
and all
Good morning,
.msg files are not as nicely structured as one might expect. And one of the issues you might experience with the loading of the data is the fact that lines from the email body might look like header data, and start with From:, To:, Date:, Subject:, Reply-To:, etc,
Anyhow, you could start of with this simple script and try to add extra layers of filtering on top of the first step:
// The first statement should create a table with three fields named @1, @2 and @3
_tmp:
LOAD *
From
// Here we filter out fields that are unrelated tp those we want to keep
_tmp2:
LOAD Subfield(@1, ': ', 1) as Header, Subfield(@1, ': ', 2) as Info
Resident _tmp
Where WildMatch(@1, 'From: *', 'To: *', 'Date: *', 'Subject: *');
DROP Table _tmp;
THis works fine with one message. If you have several, it would be best to wrap this up in a DoDir (you can find this in the QlikView help) where you could assign a incremental number to each message read. Then, using the CrossTable instruction, you could have your self a nice table with the appropriate fields ready for analysis.
Hope this guides you in the appropriate direction,
Regards,
Philippe
Depending on how extensive this type of analysis will be you might have a benefit of using a third-party commercial solution to handle this type of unstructured data:
QVSource has a very nice solution that cover amongst some 40+ connectors mailboxes (IMAP/POP) which
most mail products today are set up to use as protocols.
You find QVSource both on QlikMarket and they have their own website [ www. qvsource . com ]
If this is too much on not something you have a budget for you could also use Regular Expressions from QlikView. You will have to call on VBScript-Functions in Macros to be able to use it from your Load Script.
This worked great to get the To, From, Date, and Subject. Is there any way to also pull in the Body of the email?
Hi @mwscott1 Do you have any update on reading a body ?