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
3. To Address
4. From Address
.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
// Here we filter out fields that are unrelated tp those we want to keep
LOAD Subfield(@1, ': ', 1) as Header, Subfield(@1, ': ', 2) as Info
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,
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.