Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
dmohanty
Partner - Specialist
Partner - Specialist

Export to Text with some Delimiter

Hi All,

I have a Straight Table (the chart may change in future to Pivot or Table Box etc etc) with some data. I Need to Export the data into a Text File but with some conditions:

  • The exported data should have the Delimiters.
  • Extract should be from every tuple and then delimiter, means one tupple then a delimeter, then 2nd tuple then a delimiter
  • Should traverse every cell and export to text.

What could be the Macro script for this to be used by a Button. Please help with some examples.

Regards!

Labels (1)
3 Replies
ashfaq_haseeb
Champion III
Champion III

Hi

In order to achieve this just right on the object select export

Select the file format as comma delimited csv,txt.

Save the file with.txt extension.

Hope it help.

Regards

ASHFAQ

dmohanty
Partner - Specialist
Partner - Specialist
Author

Thanks.

Am New to Macro.

could you please show me how?

ashfaq_haseeb
Champion III
Champion III

Hi,

My solution was not using macros.

If you need macro.

please find the below code.

sub Export

    set XLApp = CreateObject("Excel.Application") ' Define Object

        XLApp.Visible = True 'Visible set as true

        set XLDoc = XLApp.Workbooks.Add 'Open new workbook   

        set table = ActiveDocument.GetSheetObject("TB04")

        rem set table = ActiveDocument.GetSheetObject("MB01")

       

    set XLSheet = XLDoc.Worksheets(1) 'Select sheet where data should be pasted

        table.CopyTableToClipboard true 'Copy data to Clipboard

        XLSheet.Paste XLSheet.Range("A1") 'Paste data into cell

   

end sub

Hope it help.

Regards

ASHFAQ