Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Execel Export

I am very new , How to call the macro for exporting data to excel , Please give some sample it will helps

5 Replies
Not applicable
Author

Hi Nagarajan,

You can write the macro
in Edit Module

macro to send data into Excel

Sub Sent_to_excel


Path = "C:\Documents and Settings\rlimumweb011\Desktop\testMail.xls"



set obj = ActiveDocument.GetSheetObject("CH266")

obj.ExportBiff Path

End Sub


'' path is the location where xls file will save with the given name

'' CH266 is the sheet object id

you have to change this according your requirement

and youo can call this macro on various events
as per your requirement

Hope this will help you

Thank You
Rahul

Not applicable
Author

Thanks Rahul,

How can i call the macro to My Chat, If its possiable please help me.

I have the chat but i could able to export the data to execl(Right click)

Thanks

Not applicable
Author

Thanks Rahul,

How can i call the macro to My Chart, If its possiable please help me.

I have the chat but i could able to export the data to execl(Right click)

Thanks

Not applicable
Author

This just exports without saving - exports two charts one under the other (CH_Cases and CH_Handling):

sub export_summary ' macro name

set v = ActiveDocument.Variables("QvWorkPath")

set XLApp = CreateObject("Excel.Application")
XLApp.Visible =true' false
set ExcelDoc = XLApp.Workbooks.Add

call REPORTING_createSelectionSheet(ExcelDoc)
ExcelDoc.Sheets.Add

ExcelDoc.Sheets(1).activate

set obj1 = ActiveDocument.getsheetobject("CH_Cases") ' here you must enter your object name
obj1.CopyTableToClipboard true
ExcelDoc.Sheets(1).cells(1,1).select
ExcelDoc.Sheets(1).paste
ExcelDoc.Sheets(1).Rows("1:1").Font.Bold = True
'obj1.Close()
set obj1 = nothing

set obj2 = ActiveDocument.getsheetobject("CH_Handling") ' here you must enter your object name
obj2.CopyTableToClipboard true
ExcelDoc.Sheets(1).cells(25,1).select
ExcelDoc.Sheets(1).paste
ExcelDoc.Sheets(1).Rows("25:25").Font.Bold = True
'obj2.Close()
set obj2 = nothing

end sub

You must then make a button in your application and assign your macro (export_summary) to it. When your then press the button your charts are exported.

rohit214
Creator III
Creator III

hi Rahul

your macro helps me lot but i want  file name also means if i have 100 dealer so at the time of reload it should generate 100 dealer report with with ddiffrent file name.(filename_DEALERNAME.xls)

thanks

rohit