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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need to Remove/Suppress Header when exporting csv.

I Need to remove/suppress the header when I export to a csv via a macro.

I've tried this solution http://community.qlik.com/thread/50853

But didnt work, it gave me a csv file with a bunch of strange text.

This is my Macro to export it to a csv:

Sub ExportToFile

'Download Sheet ojbect data to CSV

set sObject = ActiveDocument.GetSheetObject("CH01")

File = activedocument.Evaluate("'gx' & timestamp(now(), 'YYYYMMDDhhmm') & '.csv'")

sObject.Export "C:\"&File ,";"

End Sub

1 Solution

Accepted Solutions
Not applicable
Author

I came up with using a program called sed.exe

So in a batch file i allready had I added the line  "C:\sed.exe" -i 1d gx*.csv which deletes the first line in the csv.

You could also put this in the macro instead but since i allready had a batch file i aded the line there.

//BR
Patrik

View solution in original post

1 Reply
Not applicable
Author

I came up with using a program called sed.exe

So in a batch file i allready had I added the line  "C:\sed.exe" -i 1d gx*.csv which deletes the first line in the csv.

You could also put this in the macro instead but since i allready had a batch file i aded the line there.

//BR
Patrik