<?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 Re: Creating Macros to Export all the data from an Application to Excel - Seperate Tabs in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-Macros-to-Export-all-the-data-from-an-Application-to/m-p/41534#M785266</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Note:&amp;nbsp; Tamil Nagaraj has been very helpful and I am working through the solution provided.&amp;nbsp; If it works, I will post it back here with any comments or questions.&amp;nbsp; He suggested I start my own thread, since the one I had found was dated.&lt;/P&gt;&lt;P&gt;If you see this, thank you Tamil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Mar 2018 15:59:57 GMT</pubDate>
    <dc:creator>crichter14</dc:creator>
    <dc:date>2018-03-02T15:59:57Z</dc:date>
    <item>
      <title>Creating Macros to Export all the data from an Application to Excel - Seperate Tabs</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Macros-to-Export-all-the-data-from-an-Application-to/m-p/41533#M785263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;I know there have been answers to this, but I need something a bit more basic.&amp;nbsp; What I am wondering is has anyone done a video (YouTube or something else) that goes over this?&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;I'm sure the example I've found here is awesome:&amp;nbsp; &lt;A href="https://community.qlik.com/thread/188549" target="_blank"&gt;Export multiple objects to excel (multi sheets) without opening the excel application&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;BUT&amp;nbsp; it's been a long time since I've used VB and I would really like something that explains what each piece does.&amp;nbsp; We are trying to export every object from Qlik to Excel on different spreadsheet tabs (xlsx) in order to audit changes to the Qlik Script.&amp;nbsp; If we can do it in Excel our users will be able to validation changes resulting from script changes are appropriate.&amp;nbsp; It doesn't matter if the object is a Table, a Chart, a List Box, etc.&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;We want everything.&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;I have included a simple code that I found (I will not take credit), but I need to expand it so that I can add more than TB01.&amp;nbsp; If I understood each piece I could adjust.&amp;nbsp; Again, I need something explained so K.I.S.S.&amp;nbsp; Keep it simple stupid - I am the stupid this time and I am humbly looking for an expert with some patience.&amp;nbsp; I can look through link codes and examples all day - but if the documentation that explains the code isn't there, it's not much help.&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Thank you in advance for any assistance you can provide.&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Cheryl&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;================================&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Sub ExcelFile&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;DIM ExcelApplication, ExcelWorkbook&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;SET ExcelApplication = CREATEOBJECT("Excel.Application")&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;SET ExcelWorkbook = ExcelApplication.Workbooks.Add&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;ActiveDocument.GetSheetObject("TB01").CopyTableToClipBoard TRUE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;ExcelWorkbook.Worksheets(1).Paste&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;ExcelApplication.DisplayAlerts = FALSE&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;ExcelWorkbook.SaveAs "C:\Users\admin.cherylr\Documents\test.xls", 56&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;ExcelApplication.Quit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;MsgBox "Export Complete"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;End Sub&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;=====================================&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/Creating-Macros-to-Export-all-the-data-from-an-Application-to/m-p/41533#M785263</guid>
      <dc:creator>crichter14</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Macros to Export all the data from an Application to Excel - Seperate Tabs</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Macros-to-Export-all-the-data-from-an-Application-to/m-p/41534#M785266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Note:&amp;nbsp; Tamil Nagaraj has been very helpful and I am working through the solution provided.&amp;nbsp; If it works, I will post it back here with any comments or questions.&amp;nbsp; He suggested I start my own thread, since the one I had found was dated.&lt;/P&gt;&lt;P&gt;If you see this, thank you Tamil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2018 15:59:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Macros-to-Export-all-the-data-from-an-Application-to/m-p/41534#M785266</guid>
      <dc:creator>crichter14</dc:creator>
      <dc:date>2018-03-02T15:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Macros to Export all the data from an Application to Excel - Seperate Tabs</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Macros-to-Export-all-the-data-from-an-Application-to/m-p/41535#M785267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The file works really well!&amp;nbsp; I am trying to merge it with another file from Tamil.&amp;nbsp; That shows the hidden tables as well.&amp;nbsp; Here's what I have so far.&amp;nbsp; I get no error message, but I also get no data.&amp;nbsp; Ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub ExcelFile&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set oXL = CreateObject("Excel.Application") &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;oXL.DisplayAlerts = False&lt;/P&gt;&lt;P&gt;oXL.visible=True 'False to hide the excel&lt;/P&gt;&lt;P&gt;Dim oXLDoc 'as Excel.Workbook&lt;/P&gt;&lt;P&gt;Dim i&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Set oXLDoc = oXL.Workbooks.Add &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;FileName = "Test.xlsx" &lt;/P&gt;&lt;P&gt;FilePath = ActiveDocument.GetVariable("vPath").GetContent.String&lt;/P&gt;&lt;P&gt;&amp;nbsp; ResetShow = ActiveDocument.GetVariable("vBO_Plan_Split").GetContent.String&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; vBO_Plan_Split = ActiveDocument.GetVariable("vBO_Plan_Split").GetContent.String&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If vBO_Plan_Split &amp;lt;&amp;gt; 1 then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.Variables("vBO_Plan_Split").SetContent "1", true&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FilePath =&amp;nbsp; ActiveDocument.Variables("vPath").GetContent.String&lt;/P&gt;&lt;P&gt;FileName =&amp;nbsp; "Export_" &amp;amp; ActiveDocument.Evaluate("date(Now(), 'DDMMYYYY hhmmss')")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;'---------------------------------------&lt;/P&gt;&lt;P&gt;SheetObj=Array("CH953","CH1093","CH1094","CH1095","CH1096","CH1145")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Chart ID's&lt;/P&gt;&lt;P&gt;'---------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i=0 to UBound(SheetObj)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'ActiveDocument.GetApplication.WaitForIdle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;oXL.Sheets.Add&lt;/P&gt;&lt;P&gt;oXL.ActiveSheet.Move ,oXL.Sheets( oXL.Sheets.Count )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set oSH = oXL.ActiveSheet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oSH.Range("A1").Select&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set obj = ActiveDocument.GetSheetObject(SheetObj(i))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; obj.CopyTableToClipboard True&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oSH.Paste &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sCaption=obj.GetCaption.Name.v&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set obj=Nothing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;oSH.Rows("1:1").Select&lt;/P&gt;&lt;P&gt;oXL.Selection.Font.Bold = True&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oSH.Cells.Select&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oXL.Selection.Columns.AutoFit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oSH.Range("A1").Select&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;oSH.Name=left(sCaption,30)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set oSH=Nothing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next &lt;/P&gt;&lt;P&gt;'---------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp; Call Excel_DeleteBlankSheets(oXLDoc)&lt;/P&gt;&lt;P&gt;'---------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;oXL.DisplayAlerts = True&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oXLDoc.Sheets(1).Select &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If FilePath &amp;lt;&amp;gt;"" then&lt;/P&gt;&lt;P&gt;oXLDoc.SaveAs FilePath &amp;amp; "\" &amp;amp; FileName &amp;amp; ".xlsx" &lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;Msgbox "Folder path can not be empty. Enter Valid path"&lt;/P&gt;&lt;P&gt;Exit Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; oXLDoc.Close FALSE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; oXL.Quit &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set oXL&amp;nbsp;&amp;nbsp;&amp;nbsp; =Nothing&lt;/P&gt;&lt;P&gt;Set oXLDoc =Nothing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ActiveDocument.Variables("vBO_Plan_Split").SetContent ResetShow, true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MsgBox "Export Complete"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'--------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Private Sub Excel_DeleteBlankSheets(ByRef oXLDoc) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; For Each ws In oXLDoc.Worksheets&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If oXLDoc.Application.WorksheetFunction.CountA(ws.Cells) = 0 Then&lt;/P&gt;&lt;P&gt;On Error Resume Next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call ws.Delete()&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&amp;nbsp; Next &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Sub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'--------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2018 17:52:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Macros-to-Export-all-the-data-from-an-Application-to/m-p/41535#M785267</guid>
      <dc:creator>crichter14</dc:creator>
      <dc:date>2018-03-02T17:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Macros to Export all the data from an Application to Excel - Seperate Tabs</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-Macros-to-Export-all-the-data-from-an-Application-to/m-p/41536#M785268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cheryl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Great and happy that you have tried to something new other than what I have provided to you. Whatever you tried so far looks good to me. Is it possible for you to attach a sample file and let me know the issues that you are facing? I will try my level best to help you tomorrow or Monday. Hope this is fine with you. Happy weekend, Cheryl.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2018 21:11:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-Macros-to-Export-all-the-data-from-an-Application-to/m-p/41536#M785268</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2018-03-02T21:11:10Z</dc:date>
    </item>
  </channel>
</rss>

