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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Removal of header in file

Dear community!

I'm generating files that are e-mailed to an automatic service. The service don't expect headers in file and I can't seem to get rid of them (besides manually...).

Anyone got a solution?

Building the report as a straight table and using Menu to export the chart to a .skv-file (Semicolon delimited).

Using QlikView 10 SR3

4 Replies
whiteline
Master II
Master II

Hi.

To copy the content of a table without headers use: RightClick->Copy to cliboard->Table Data Area. Then you can paste it wherever you want.

Or you could  try to use VBS macro to create a file with the content you want automatically.

Not applicable
Author

Hi,

copy is not an option since I want it as auto as possible.

However I use a button with Export Action and that works, kind of.

Since we are in AJAX I can't get it to apply a file name and where to save it. Perhaps a macro could?

If possible I don't wont to use a macro since it's a dead end.

whiteline
Master II
Master II

Hi.

In this case you could store table from script and then use something outside a QV to remove the first string from file.

Not applicable
Author

You could loop through the file and skip the first row. Here is an example of looping through a straight table and skipping the first row.

Sub ExportToExcel

   ExcelAppend "c:\test.xlsx", "CH05" 

   msgbox("Export Complete")

End Sub

Sub ExcelAppend(strExcelAppenFile, strExelAppendObjectID) 

   ' Create an instance of Excel 

   SET objExcelApp = CREATEOBJECT("Excel.Application") 

    

   ' Open workbook 

   WITH objExcelApp 

      .DefaultSaveFormat = xlWorkbookNormal 

      .DisplayAlerts = FALSE 

      .Workbooks.Open strExcelAppenFile 

      .DisplayFullScreen = FALSE 

      .Visible = FALSE 

   END WITH 

    

   ' Set worksheet 

   SET objExcelSheet = objExcelApp.Worksheets(1) 

       

   ' Set Excel used range 

   SET objExcelRange = objExcelSheet.Range("A65535").End(-4162) 

   ' Last used row in column A 

   intExcelLastRow = objExcelRange.Row 

   ' Set object to append from 

   SET objObjectFrom = ActiveDocument.GetSheetObject(strExelAppendObjectID) 

   ' Loop all rows of the object (except the first row)

   FOR intObjectRow = 1 To objObjectFrom.GetRowCount - 1 

      ' Loop all columns of the object 

      FOR intObjectColumn = 0 To objObjectFrom.GetColumnCount - 1 

         ' Get object data 

         SET objCell = objObjectFrom.GetCell(intObjectRow, intObjectColumn) 

         ' Add that data to Excel cell 

         objExcelSheet.Cells(intObjectRow + intExcelLastRow, intObjectColumn + 1) = objCell.Text 

      NEXT 

   NEXT 

    

   ' Save and quit 

   objExcelSheet.SaveAs strExcelAppenFile 

   objExcelApp.Application.Quit 

   SET objExcelSheet = NOTHING       

   SET objExcelApp = NOTHING 

END SUB