<?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: Macro Export Excel with current Date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-Export-Excel-with-current-Date/m-p/1635498#M446761</link>
    <description>&lt;P&gt;Ayoub, did Mike's post help you get this working?&amp;nbsp; If so, be sure to come back and use the Accept as Solution button on his post to let others know it worked and to give him credit for the help.&amp;nbsp; If you did something else, consider posting that and mark it, and if you are still working on things, leave an&amp;nbsp; update.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
    <pubDate>Tue, 15 Oct 2019 14:33:04 GMT</pubDate>
    <dc:creator>Brett_Bleess</dc:creator>
    <dc:date>2019-10-15T14:33:04Z</dc:date>
    <item>
      <title>Macro Export Excel with current Date</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Export-Excel-with-current-Date/m-p/1633707#M446654</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hello Community,&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I want to create a macro which allows me to export Excel file with a&amp;nbsp;specific name like '&lt;FONT color="#FF0000"&gt;File_10102019.xls&lt;/FONT&gt;'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I've created a variable &lt;FONT color="#339966"&gt;vFileName&lt;/FONT&gt; and i defined it like : &lt;FONT color="#0000FF"&gt;='File_'&amp;amp;Date(today(),'DDMMYYYY')&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and i set a variable giving it the value above and passed it to the macro like the code bellow.&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;but it doesn't work, and maybe someone could help me &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thank you so much &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;Sub exportToExcel()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;DIM vFileName&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;Set obj = ActiveDocument.GetSheetObject("CH04")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;SET f = ActiveDocument.Variables("vFileName")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;fname = f.GetContent.STRING&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;obj.ExportBiff "fname"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;dim ExcelApp, ExcelWB&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;set ExcelApp = createobject("Excel.Application")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;ExcelApp.visible = true&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;set ExcelWB = ExcelApp.Workbooks.Open("fname")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;Set obj = nothing&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;End Sub&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:15:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Export-Excel-with-current-Date/m-p/1633707#M446654</guid>
      <dc:creator>Ayoub</dc:creator>
      <dc:date>2024-11-16T02:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Export Excel with current Date</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Export-Excel-with-current-Date/m-p/1634441#M446690</link>
      <description>&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;evaluate(Date(today(),'DDMMYYYY'))&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 19:21:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Export-Excel-with-current-Date/m-p/1634441#M446690</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2019-10-11T19:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Export Excel with current Date</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Export-Excel-with-current-Date/m-p/1635498#M446761</link>
      <description>&lt;P&gt;Ayoub, did Mike's post help you get this working?&amp;nbsp; If so, be sure to come back and use the Accept as Solution button on his post to let others know it worked and to give him credit for the help.&amp;nbsp; If you did something else, consider posting that and mark it, and if you are still working on things, leave an&amp;nbsp; update.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 14:33:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Export-Excel-with-current-Date/m-p/1635498#M446761</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-10-15T14:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Export Excel with current Date</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Export-Excel-with-current-Date/m-p/1635556#M446766</link>
      <description>&lt;P&gt;Here's the solution this macro ..&amp;nbsp; give u the opportunities to export file in xlsx format ,display it on the screen and save it in a specific repository .. thanks to the community for help &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;Sub Export&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;Dim oXLDoc, i&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;set oXL = CreateObject("Excel.Application")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;oXL.DisplayAlerts = False&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;oXL.visible = True 'False to hide the excel&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;Set oXLDoc = oXL.Workbooks.Add &lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;FilePath = "C:\Users\a.e\Desktop\TEST_AUTOMATISATION_FILE\" ' File path can be changed later.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;FileName = "Fichier_d'Enrichissisement_tiers_" &amp;amp; ActiveDocument.Evaluate("date(Now(), 'DDMMYYYY')") 'Date format can be changed later&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;'---------------------------------------&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;SheetObj=Array("CH04") 'Chart ID's&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;'---------------------------------------&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;for i=0 to UBound(SheetObj)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;oXL.Sheets.Add&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;oXL.ActiveSheet.Move ,oXL.Sheets( oXL.Sheets.Count )&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;Set oSH = oXL.ActiveSheet&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;oSH.Range("A1").Select&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;Set obj = ActiveDocument.GetSheetObject(SheetObj(i))&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;obj.CopyTableToClipboard True&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;oSH.Paste &lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;'sCaption=obj.GetCaption.Name.v&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;oSH.Rows("1:1").Select&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;oXL.Selection.Font.Bold = True&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;oXL.Selection.AutoFilter&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;oSH.Cells.Select&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;oXL.Selection.Columns.AutoFit&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;oSH.Range("A1").Select &lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;'oSH.Name=left(Feuil1,30) &lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;Set obj=Nothing&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;Set oSH=Nothing&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;Next &lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;'---------------------------------------&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;Call DeleteBlankSheets(oXLDoc)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;'---------------------------------------&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;oXLDoc.Sheets(1).Select &lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;oXLDoc.SaveAs FilePath &amp;amp; FileName &amp;amp; ".xlsx" &lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;oXL.DisplayAlerts = True&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;oXLDoc.Close True&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;oXL.Quit &lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;dim ExcelApp, ExcelWB&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;set ExcelApp = createobject("Excel.Application")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;ExcelApp.visible = true&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;set ExcelWB = ExcelApp.Workbooks.Open(FilePath &amp;amp; FileName &amp;amp; ".xlsx")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;Set oXL =Nothing&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;Set oXLDoc =Nothing&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;Msgbox "Exportation terminée avec succès."+ VbCrLf + "Veuillez Supprimer les doublons."&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;End Sub&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;Private Sub DeleteBlankSheets(ByRef oXLDoc)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;For Each ws In oXLDoc.Worksheets&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;If oXLDoc.Application.WorksheetFunction.CountA(ws.Cells) = 0 Then&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;On Error Resume Next&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;Call ws.Delete()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;End If&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;Next&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#003366"&gt;End Sub&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 16:42:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Export-Excel-with-current-Date/m-p/1635556#M446766</guid>
      <dc:creator>Ayoub</dc:creator>
      <dc:date>2019-10-15T16:42:23Z</dc:date>
    </item>
  </channel>
</rss>

