Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

VB script needed for local execution - plz help

Hi,

I have an app where it would be very practical indeed if one could just push a  button and the contents of a table_chart in the app were automatically exported to Excel and saved in a specific location under a specific name including the current date. Such a VB script would not work on the server of course, but it would be practical and save some time for local execution.

I have no experience with writing VB scripts, but I have worked with VBA and some tool-specific languages which are quite similar, so when I see some VB I can just about understand what it does. Writing in VB is a different matter, however ...

I have already constructed some single-object-URLs for that app so the adressee who needs the data daily can view it in his browser and extract it to Excel from the Browser - but if there was a button in the app itself, even if that would probably work only in the Client, that would  be faster still - and I'm always interested in learning something new.

I'm sure there are already some threads on this issue and maybe a document to show how it is done - if there is, I'm quite willing to read some How-To or so, but not necessarily read an entire discussion and piece it together ... can somebody maybe point me at something suitable?

Thanks a lot!

Best regards,

DataNibbler

5 Replies
datanibbler
Champion
Champion
Author

Hi,

I am still on the lookout for something like that. The issue must have been around here quite a few times, so I guess there also is some snippet around that I could use, but I just don't know ...

It's not much that script would have to do - just export one table_diagram to Excel and save it under a standardized name in a specific path, overwriting the old one every da. It would be processed further from there ...

I will continue searching for something. Maybe someone can point me to something to make it a bit easier?

Thanks a lot!

Best regards,

DataNibbler

marcus_sommer

Hi DataNibbler,

here are various postings to this topic: https://community.qlik.com/search.jspa?q=excel+export&type=document

- Marcus

datanibbler
Champion
Champion
Author

Thanks Marcus!

Sorry, this is quite late - I have seen your answer long ago, but then came a new task for me and I didn't have the time to revisit this. Not that I actually do have the time now 😉

datanibbler
Champion
Champion
Author

Hi Marcus,

I'm just experimenting with that Northwind app - the very first in the list. It's from 2014, but that shouldn't make a difference. As I have no experience with VB, I need to step through this script and see what it does first.

Strangely, it seems that QV is changing languages - I have modified something in the script, now two new sheets are created anytime I press the button - the first is called "New Sheet" and the second "Arbeitsblatt 2" (German).

Can you guess what might cause this?

(it is also repeatable - when i press a second time, two more sheets are created, again one has an English name and the other one has a German name)

datanibbler
Champion
Champion
Author

Pff. I realized I don't need the biggest part of that script - I don't need to create any objects. I already have one table that I want to export.

Maybe that collection of macros by jagan is more helpful to my purpose.

I just need to export that one table to Excel, nothing more.