Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewforum
Creator II
Creator II

Read the data from the xlsx into qvw and store it as a csv file into one location

Hi,

When I click on a button I would like to read the data from one of the sheet from xlsx file which is in one location and store the data into csv format into someother different location.

Basically the QVW should read the data from an excel file and whatever is there in the qvw table should be store as an csv file into someother location.

Can someone please let me know how this can be achieved?

6 Replies
simondachstr
Luminary Alumni
Luminary Alumni

You can store your table as a .txt file.

e.g.

store mytable into myfile.txt (txt);

See QlikView Reference Manual 11 Page 267.

qlikviewforum
Creator II
Creator II
Author

Thanks for your response!

I'm not planning to store the loaded table as it is. I want to store the table which is there in the QVW. Please let me know if you have any questions.

For example, If I have straight table in qvw I want to store that as a csv. Is that possible? Please help...

simondachstr
Luminary Alumni
Luminary Alumni

Sure that's possible, but manually: Right-click, Export, Save as .csv file.

Does that answer your question?

My above example is to be implemented within the loading script.

qlikviewforum
Creator II
Creator II
Author

I know that is possible when you right click on the object. I want to export it on button action. Any suggestions please?

Not applicable

Something like this (object ID is CH337 in this example):

Sub ExportToCSV

     set obj = ActiveDocument.GetSheetObject("CH337")

     obj.Export "C:\<path>\Filename.csv", ","

End Sub

maxgro
MVP
MVP

did you try with this action in a button?

it's an export of selected fields

1.png