1 Reply Latest reply: Jul 2, 2013 5:05 PM by Steve Lord RSS

    appExcel.ActiveSheet.SaveAs how to save in Excel 2003

      Hi all... i've to export one table from qlikview to excel; i've done one macro that do the job in a correct way but the file created is in 2010 format (xlsx).

      Now i've to open this file with a 2003 version of excel (.xls), modify it and then reload in qlikview.

      i'd like to know if there is a way to specify the format of the file to export.


      best regards


        • Re: appExcel.ActiveSheet.SaveAs how to save in Excel 2003
          Steve Lord

          Fear I have an answer for this.  You should be able to just switch the .csv in my code below with a .xls or add an &".xls" to the end of the filename in your script.


          If you' use the same vb type code I have below, you can specify the file extension where you specify the file name and it works.  There might be something like that on whichever code protocol you are using too.  (I hadn't played with this script in a month, but I pushed the button just now and the file came out with today's date in the name and .csv format.)


          Here is macro code I have on an export to file button in one of my files.


          Sub Test

          set obj = ActiveDocument.GetSheetObject("TB02")

          File = "C:\users\steve\desktop\"&"Test "& DatePart("YYYY", Now()) & "-"& DatePart("M", Now()) &"-"& DatePart("D", Now()) & ".csv"

          obj.Export File, ","


          (I had it up to emailing the file, but I broke that by accident and lost the backup so fell back to this straight export for now. )