Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Talk to Experts Tuesday, Live Q&A, September 22: Moving from QlikView to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

How can i export data into .csv format..?

Hi..

Please help me out...

Thank

RMB

7 Replies
Highlighted
Not applicable

Hi Mohan babu

Try This Macro for export your data into .csv format

Add a Button to trigger the Macro.

First you have to Set Variable to pass to the macro as it is not allowed to pass variables in the macro call.   (vMCont and vMTab)

vMCont = container Object ID

vMTab = See Container  - General - Label for Selected Item

Run macro = SetTabInContainer

Paste following code in to the macro editor

Sub SetTabInContainer


Set Container = ActiveDocument.Variables("vMCont")
Set Tab = ActiveDocument.Variables("vMTab")
Call InteranlSetTabInContainer(Container.GetContent.string,Tab.GetContent.string)

end sub


Sub InteranlSetTabInContainer (Container, Cname)



NewIndex = 0

Set ContainerObj = ActiveDocument.GetSheetObject(Container)
set ContProp=ContainerObj.GetProperties

for i = 0 to ContProp.ContainedObjects.Count - 1

if ContProp.ContainedObjects.Item(i).Text.v = Cname then
NewIndex = i
End IF

next


ContProp.SingleObjectActiveIndex = NewIndex
ContainerObj.SetProperties ContProp

end Sub    

Highlighted
Not applicable

Right Click---> Export--> Save As (CSV)   (Right click on the Chart Object)

Hope it helps..

Selva

Highlighted
Not applicable

Hi Mohan,

  Simple default functionality of qlikview you can use. Right Click on Table go to Export Option then it will ask where to save there choose CSV from the Save As Type and save.

Highlighted
Not applicable

Thanks Guys..

Highlighted
Not applicable

Welcome. Check on the Correct Answer. it helps others.

Highlighted
Not applicable

Close this thread by marking correct answer

Highlighted
Specialist
Specialist

Hi,

If you want to store a complete table into a .csv during a reload you can use the STORE function in the script.

STORE  mytable into mytable.txt (txt);

This will create a comma separated txt file.