Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mwscott1
Creator
Creator

Join Excel file to Temp Table

I found a script that will allow me to pull the header information out of an Outlook .MSG file. The script creates two tables "Header" and "Info". The Info table contains 4 rows, one of which is the Subject of the email. How can I join/match this line to another table I created that includes a subject column and a body column. The body of the email is standard depending on the subject. I created the second table, because I was unable to figure out a way to pull in the body of the email with the first script. So I am trying to now pull in the body info based on the join of the subject.

// The first statement should create a table with three fields named @1, @2 and @3

_tmp:

LOAD *

From (txt, codepage is 1252, no labels, delimiter is '\t', msq, no eof);

  // Here we filter out fields that are unrelated to 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;

// My table I created

CE_EMAIL_MESSAGE:

LOAD Subject,
Body
FROM

(ooxml, embedded labels, table is
Sheet1);

0 Replies