<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Export to xls in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Export-to-xls/m-p/3526#M791450</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Goodmorning,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first question: I would like to export a report to xls, I'm using the following macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub gimo&lt;/P&gt;&lt;P&gt;'Set the path where the excel will be saved &lt;/P&gt;&lt;P&gt;filePath = "C:\gimo.xls"&lt;/P&gt;&lt;P&gt;'Create the Excel spreadsheet &lt;/P&gt;&lt;P&gt;Set excelFile = CreateObject("Excel.Application")&lt;/P&gt;&lt;P&gt;excelFile.Visible = true&lt;/P&gt;&lt;P&gt;'Create the WorkBook&lt;/P&gt;&lt;P&gt;Set curWorkBook = excelFile.WorkBooks.Add&lt;/P&gt;&lt;P&gt;'Create the Sheet&lt;/P&gt;&lt;P&gt;Set curSheet = curWorkBook.WorkSheets(1)&lt;/P&gt;&lt;P&gt;'Get the chart we want to export&lt;/P&gt;&lt;P&gt;Set tableToExport = ActiveDocument.GetSheetObject("CH558")&lt;/P&gt;&lt;P&gt;Set chartProperties = tableToExport.GetProperties&lt;/P&gt;&lt;P&gt;tableToExport.CopyTableToClipboard true&lt;/P&gt;&lt;P&gt;'Get the caption&lt;/P&gt;&lt;P&gt;chartCaption = tableToExport.GetCaption.Name.v&lt;/P&gt;&lt;P&gt;'MsgBox chartCaption&lt;/P&gt;&lt;P&gt;'Set the first cell with the caption&lt;/P&gt;&lt;P&gt;curSheet.Range("A1") = chartCaption&lt;/P&gt;&lt;P&gt;'Paste the rest of the chart&lt;/P&gt;&lt;P&gt;curSheet.Paste curSheet.Range("A2")&lt;/P&gt;&lt;P&gt;excelFile.Visible = true&lt;/P&gt;&lt;P&gt;'Save the file and quit excel&lt;/P&gt;&lt;P&gt;excelFile.Visible = false&lt;/P&gt;&lt;P&gt;excelFile.DisplayAlerts = False&lt;/P&gt;&lt;P&gt;curWorkBook.Close&lt;/P&gt;&lt;P&gt;excelFile.Quit&lt;/P&gt;&lt;P&gt;'Cleanup&lt;/P&gt;&lt;P&gt;Set curWorkBook = nothing&lt;/P&gt;&lt;P&gt;Set excelFile = nothing&lt;/P&gt;&lt;P&gt;'XLApp.Quit&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;End Sub&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks working, I mean no errors, but it doesn't save any "gimo.xls". &lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Export to xls</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-xls/m-p/3526#M791450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Goodmorning,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first question: I would like to export a report to xls, I'm using the following macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub gimo&lt;/P&gt;&lt;P&gt;'Set the path where the excel will be saved &lt;/P&gt;&lt;P&gt;filePath = "C:\gimo.xls"&lt;/P&gt;&lt;P&gt;'Create the Excel spreadsheet &lt;/P&gt;&lt;P&gt;Set excelFile = CreateObject("Excel.Application")&lt;/P&gt;&lt;P&gt;excelFile.Visible = true&lt;/P&gt;&lt;P&gt;'Create the WorkBook&lt;/P&gt;&lt;P&gt;Set curWorkBook = excelFile.WorkBooks.Add&lt;/P&gt;&lt;P&gt;'Create the Sheet&lt;/P&gt;&lt;P&gt;Set curSheet = curWorkBook.WorkSheets(1)&lt;/P&gt;&lt;P&gt;'Get the chart we want to export&lt;/P&gt;&lt;P&gt;Set tableToExport = ActiveDocument.GetSheetObject("CH558")&lt;/P&gt;&lt;P&gt;Set chartProperties = tableToExport.GetProperties&lt;/P&gt;&lt;P&gt;tableToExport.CopyTableToClipboard true&lt;/P&gt;&lt;P&gt;'Get the caption&lt;/P&gt;&lt;P&gt;chartCaption = tableToExport.GetCaption.Name.v&lt;/P&gt;&lt;P&gt;'MsgBox chartCaption&lt;/P&gt;&lt;P&gt;'Set the first cell with the caption&lt;/P&gt;&lt;P&gt;curSheet.Range("A1") = chartCaption&lt;/P&gt;&lt;P&gt;'Paste the rest of the chart&lt;/P&gt;&lt;P&gt;curSheet.Paste curSheet.Range("A2")&lt;/P&gt;&lt;P&gt;excelFile.Visible = true&lt;/P&gt;&lt;P&gt;'Save the file and quit excel&lt;/P&gt;&lt;P&gt;excelFile.Visible = false&lt;/P&gt;&lt;P&gt;excelFile.DisplayAlerts = False&lt;/P&gt;&lt;P&gt;curWorkBook.Close&lt;/P&gt;&lt;P&gt;excelFile.Quit&lt;/P&gt;&lt;P&gt;'Cleanup&lt;/P&gt;&lt;P&gt;Set curWorkBook = nothing&lt;/P&gt;&lt;P&gt;Set excelFile = nothing&lt;/P&gt;&lt;P&gt;'XLApp.Quit&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;End Sub&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks working, I mean no errors, but it doesn't save any "gimo.xls". &lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-xls/m-p/3526#M791450</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
  </channel>
</rss>

