Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Export Table box to Text File

Hi All,

I have to export a table box from qlikview to Text file.For that i am using the macros.

'-------------------------- 

' Export QC Chart Routine 

'------------------------- 

sub ExportChart   

   

output_dir="\\ntb\QlikView$\" 

Filename="DataFile.txt" 

set obj = ActiveDocument.GetSheetObject("CH01") 

obj.Export (output_dir & Filename) , "|" 

end sub  

This is working fine in My local machine.

But i have to export the file to another server machine,which i have  a UID and PWD through which i can login.

How can i achieve that?

I think i have to modify the script in such a way that the UID and PWd is specified.

Please suggest.

Thanks in adavance

Regards,

Reena

7 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Macros are not supported in Browser.

Check this link.

Re : Macro Not working In Accesspoint

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Kushal_Chawda

Create the shared folder on destination server machine. Now put this shared folder path in Macro (Output directory).

Not applicable
Author

Hi,

I don't need to publish this dashboard.This qvw is only required for exporting the file to txt and placing the file in the destination.

petter
Partner - Champion III
Partner - Champion III

Macros are supported in the browser. But not all functionality is available. Please read the QlikView Reference Manual and it will clarify things for you.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Thanks Petter I will make a note of this.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
petter
Partner - Champion III
Partner - Champion III

You can use this:

Add a shared network drive mapping.

Syntax

objNetwork.MapNetworkDrive(strLocalDrive, strRemoteShare, [persistent], [strUser], [strPassword])

Key

objNetwork     : A WScript.network object

strLocalDrive  : The drive letter (e.g. L:)

strRemoteShare : The UNC path to the remote drive

\\MyServer\MyPrinter (String value) 

persistent     : True/False - store the mapping persistently in the users

profile default = false 

strUser        :  The user name. (Optional)

strPassword    :  The password. (Optional)

Example

Dim objNetwork, strRemoteShare
Set objNetwork = WScript.CreateObject("WScript.Network")
strRemoteShare = "\\myserver\users"
objNetwork.MapNetworkDrive "H:", strRemoteShare, False, "userid", "passw"

This is taken from:     ss64 . com /vb/mapnetworkdrive.html

Not applicable
Author

Hi Petter,

Could you please explain more?

How should i modify the script with this?