Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
agni_gold
Valued Contributor II

Export table object in EXCEL format

I have tried many macros for this , but all these macros not working please help .

I have tried

SUB export

set obj = ActiveDocument.GetSheetObject("TB01")

obj.exportBiff "C:\Documents and Settings\596732\Desktop\manasvi\abc.xlsx";

end sub

call export;

compiler not processing

obj.exportBiff "C:\Documents and Settings\596732\Desktop\manasvi\abc.xlsx";

3 Replies
MVP
MVP

Re: Export table object in EXCEL format

Hi Agnivesh,

Where are you calling the 'call export;' statement?  If it is during reload the screen objects are not at that point rendered so can not be accessed.

I would suggest that you test your macro by assigning a call to it as an action on a button.  If this works you could look at triggering on Post Reload.

Please see my response on this other thread for more details:

http://community.qlik.com/message/443676#443676

Steve

Employee
Employee

Re: Export table object in EXCEL format

Objects (tables, graphs) are not available at script time.

You can use an action of type external attached to OnReload trigger

svsudhakar
Contributor

Re: Export table object in EXCEL format

Hi,

Please create the trigger for calling the macro on post loading.

Settings-->Doc properties--:Add -->Run Macro-->Provide the Macro name

In Edit Module write the below macro code.

sub Export

set obj1 = ActiveDocument.GetSheetObject("CH01")

obj1.Export "D:\InnerJoin.xls",4

msgbox("Done")

end sub 

Regards,

sudhakar

Community Browser