Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

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

Hi..

Please help me out...

Thank

RMB

7 Replies
Not applicable

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

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    

Not applicable

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

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

Hope it helps..

Selva

Not applicable

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

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.

Not applicable

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

Thanks Guys..

Not applicable

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

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

Not applicable

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

Close this thread by marking correct answer

morris70
Not applicable

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

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.