Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Send automatically pivot table by email

Hi friends,

There is pivot table, which I need to send every day to others people.

Is it possible to automate this process?

Thanks.

4 Replies
Gysbert_Wassenaar

Yes. You can use the search function to find discussions about this subject: http://community.qlik.com/search.jspa?q=email+report


talk is cheap, supply exceeds demand
fkeuroglian
Partner - Master
Partner - Master

Hi,

It is posible, and you have to do it using MACRO.

First of alla you have to export to excel or pdf and then you have to send to email with the atached element

try with this script

----------------------------------------------------------------------------------------------------------------------------------------------------

SendGMail

ActiveDocument.Save

set objExcel=nothing

set strDate=nothing

set filepath=nothing

End Sub

Sub SendGMail()

MsgBox "Report Exported Successfully"

strDate = Year(Date()) &"-"& month(date()) &"-"& Day(Date()) 

filepath="D:\Excel_"&strDate&".xls"

Set objMsg = CreateObject("CDO.Message")

Set msgConf = CreateObject("CDO.Configuration")

'Server Configuration

msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"

msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "500vikas@gmail.com"

msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "**********" 'Type your acccount Password

msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1

msgConf.Fields.Update

'End With

objMsg.To = "Sender Mail ID"

objMsg.From = "Xyzz@gmail.com"

objMsg.Subject = "Test mail"

objMsg.HTMLBody = "QlikView Test Mail"

'objMsg.AddAttachment "D:\Image.jpg"

objMsg.AddAttachment   filepath    ' Attachement

objMsg.Sender = "Mr. Name"

Set objMsg.Configuration = msgConf

' Send

objMsg.Send

Msgbox("Email Sent Successfully")

' Clear

Set objMsg = nothing

Set msgConf = nothing

End Sub

-----------------------------------------------------------------------------

Just edit your mail and password and all the server smtp information

I attached another example as export to pdf and excel

http://luciancotea.wordpress.com/2013/07/18/qlikview-macros-useful-collection/

good luck!

FERNANDO

whiteline
Master II
Master II

Hi.

Yes it's possible.

I guess that you've already found something useful here. Anyway, you can start from this http://community.qlik.com/docs/DOC-3772

Anonymous
Not applicable
Author

WHERE TO RUN THIS MACRO?

I NEED TO RUN IN QLIKVIEW APPLICATION (CNTRL + M)?