3 Replies Latest reply: Jun 29, 2017 10:13 AM by Tamil Nagaraj RSS

    Qlikview Desktop - Excel Export - Insert Rows

    Jan-Hendrik Esterhuyse

      Hi fellow Qliks


      I have written a macro (really copied from previous community examples) which exports a straight table object into a existing excel file.


      The excel file a sort of a template where other content already exist (headers / footers / logo etc)


      My challenge is that the number of rows in the table can vary from selection to selection, but I want to insert (copy) the table between content and then only have 1 clean excel row between the exported table and the existing content in the worksheet.


      I'm attaching an example


      - The "Template.xlsx" file which is the existing excel template (must be copied into the C:\ drive of your computer (or change it on the macro script to new location"

      - The .qvw file with the straight table and the export macro (trigger from button)

      - The excel file "Results.xlsx" showing the end result I want to achieve (you will notice the original content in row 6 has moved down)


      I want the macro to paste the table into cell "A4" and then the content in row 6 (which is a block where person must sign) must move down so that it appear after the inserted table,


      So I would imagine that it should do a copy-insert or something else to allow it, but I'm not sure how to do this. I know nPrinting does this beautifully, but unfortunately we do not have this luxury.


      Any help / suggestions will be appreciated