Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

How to save the output file in my machine?

Hi Every One!

i have out data in one Table box then i need to tranfer the that data into text formatte using button click..

Then my requirment is..when ever i clicking the button i need to open the filebrowser for asking the file name and location.

plz help me on this

Many Thanks

vasu.I

9 Replies
Not applicable

Re: How to save the output file in my machine?

hello,

I think it is possible to achieve this using a macro :

1) Create one macro ( Ctrl+M) :

     

          function exportTxt

                   set tBox=ActiveDocument.GetSheetObject("TB01")

                   Filename=inputBox(" Name of the file : ")

                   tBox.Export "C:\"&Filename&".txt",";"

           end function

replaced "TB01"  by the identifier of your tablebox

2) Create one button and add an action : Run macro

   

Run_Macro.png

Call your macro with Macro Name. for this example is exportTxt

3) click on your button and look in C: \

Against by the filebrower I do not know, you can always try to use an other inputbox : /

Laurent A

Not applicable

Re: How to save the output file in my machine?

HI Thanks for ur reply..it's working fine

but user wants to give the File location where he want eitther c:\ or D:\ in some folder..

it seem to look like a file saving in a MS-office...

is it possible in Qlikview?

plz help me on this,

Many Thanks

vasu.I

Re: How to save the output file in my machine?

Hi,

   Create a inputbox.

   This is a place where user will be entering the path of the file, where they want to save the file. (location)

Regards,

Kaushik Solanki

Not applicable

Re: How to save the output file in my machine?

Hi kasushik,

i found vb script function for getting the Filebrowser for Open and save and it's working fine

function exportTxt

      Set objDialog = CreateObject("MSComDlg.CommonDialog")

     objDialog.MaxFileSize = 256

      objDialog.Flags = &H80000 + &H4 + &H8

      intResult = objDialog.ShowSave()

      BrowseForFile1 = objDialog.FileName

    set tBox=ActiveDocument.GetSheetObject("TB01")

    tBox.Export ""&BrowseForFile1&".qvd",","

end function

Thanks

Re: How to save the output file in my machine?

Hi,

   Gr8.

Regards,

Kaushik Solanki

Not applicable

Re: How to save the output file in my machine?

Kaushik

i have a problem while Importing the Book marks from my mechine

in my mechine Bookmarks stores like vas06-07-2011.BM.xml

and i am importing the Bookmarks like

BrowseForFile3="C:\Users\Administrator\Desktop\SS1\vas06-07-2011.BM.xml"

ActiveDocument.ImportBookmarks "&BrowseForFile3&", 0

but here not imprting the bookmarks

is there any problem

plz help me

Thanks

vasu

Re: How to save the output file in my machine?

Hi,

   Try just

   ActiveDocument.ImportBookmarks BrowseForFile3, 0

Regards,

Kaushik Solanki

Not applicable

Re: How to save the output file in my machine?

Hi Thanks it's wroking

and kaushik what's the problem using the triggers in onsctive sheet..

here i facing a problem when applying the trigger on active sheet for selection all feilds

when the bookmark is appling..the tigger also applying then it selects all feilds..

i dont know why it happens.

let me Help on this

Thanks

vasu

Re: How to save the output file in my machine?

Hi,

   It is already stated by Qlikview that use of macro in application may effect the other operation.

   So i even cant say why it is happening.

   Please mark this post as answered, and if you have any other problem, create a new post.

   Please do not mix the question in one post.

Regards,

Kaushik Solanki

Community Browser