Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Author

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
Author

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

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

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

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

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Gr8.

Regards,

Kaushik Solanki

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

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

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Try just

   ActiveDocument.ImportBookmarks BrowseForFile3, 0

Regards,

Kaushik Solanki

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

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

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

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