Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Exporting an xls file with a predefined name

hi all,

i would like to export a table to an excel file,

with the name of the table + today's date,

do you know how to do this?

thanks,

Nir

6 Replies
Anonymous
Not applicable
Author

try this....

public function Export

  set obj = ActiveDocument.GetSheetObject("EXPORT")

  ActiveDocument.GetApplication.WaitForIdle

  fileName = "ExportScreen_" & replace(replace(replace(date() & "_" & time(), "/", ""), ".", ""), ":", "") & ".xlsx"

  ActiveDocument.GetApplication.WaitForIdle

  obj.Export vFolder & fileName

end function

Not applicable
Author

Anonymous
Not applicable
Author

still the same gibrish..

the oly thing i changed is the EXPORT to the object ID in the report

obj.Export vFolder & fileName // what is vFolder? should i create it?

Anonymous
Not applicable
Author

it's a variable defining the path to export to

here's an example that uses a slightly different approach...same principle though

Anonymous
Not applicable
Author

Thanks for your help!

I think i understand it now,

the thing is i need to implement this for users that QV by access point,

while this works only on desktop client

Anonymous
Not applicable
Author

Okay - then, yes, there are a couple of constraints.

Most (probably safe to say all) macro scripts will not execute within the AJAX client.

If you need to utilize a macro from access point for users then you could use the IE Plugin with IE as your browser....or you could have them open the qvw from the server using the qlikview desktop client.