Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
pnn44794
Partner - Specialist
Partner - Specialist

Need To Export Straight Table To Excel Automatically On Reload

Hello:

I have a straight table with, currently, 59 columns that I need to export off to a server location in Excel .xlsx format when the dashboard reloads.  The reload is automatic at a set time.  I'm guessing the filename will need to be unique each time it's reloaded, so a date stamp would be fine on the end of the filename.  I've read several posts on this topic, but none that quite fit my needs.  Anyone have any ideas on how I may be able to do this?  I've tried the following macro in Document Properties --> Triggers --> OnPostReload, but the file is, for the most part, unusable.  It does get exported, but again, you can't really use it as everything seems to run together.

sub Export

set obj1 = ActiveDocument.GetSheetObject("CH238")

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

msgbox("Exported to D:\InnerJoin.xls")

end sub

Thanks in advance.  As always, any and all responses are appreciated.

1 Solution

Accepted Solutions
olivierrobin
Specialist III
Specialist III

hello

instead of exporting in excel format, why don't you create a .csv file ?

in script,

you could add something like :

store mytable into $(filename) (txt)

where filename is a variable composed with a prefix and (say) the current date ?

View solution in original post

3 Replies
olivierrobin
Specialist III
Specialist III

hello

instead of exporting in excel format, why don't you create a .csv file ?

in script,

you could add something like :

store mytable into $(filename) (txt)

where filename is a variable composed with a prefix and (say) the current date ?

pnn44794
Partner - Specialist
Partner - Specialist
Author

Olivier, Olivier, Olivier.  What you suggest would be way too easy and make too much sense.  LOL 

 

It's actually a great idea!  I was making it harder than it needed to be.  So, thank you very much for the idea.  I have successfully implemented it.  I wound up with two variables and the Store Into line.

So, again, thank you Olivier for your suggestion.  I appreciate it and your response.  I have a little more work to do such as picking the columns I actually want to output and moving a few calculated dimensions into the load script, but not a big deal.  I'll mark your reply as the correct answer.

 

jasmina_karcic
Creator III
Creator III

where you write this code?

 

Thanks