<?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 Import From Excel Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Import-From-Excel-Macro/m-p/1570611#M442083</link>
    <description>&lt;P&gt;I am currently using the following macros to browse for a file and import it:&lt;/P&gt;&lt;PRE&gt;Sub BrowseFolder
	 Const OverWrite = True
	 Dim destpath,  srcFiles
     Set objShell = CreateObject("Shell.Application")
     Set objFolder = objShell.BrowseForFolder(0, "Example", 16384,"Computer")
       On Error Resume Next
           If objFolder Is Nothing Then
          Wscript.Quit
     End If

 	 ActiveDocument.Variables("vFileName").SetContent objFolder.title, true
	 ActiveDocument.Variables("vFolderName").SetContent objFolder.self.path, true    
 
End Sub





Sub Import

MsgBox "Importing... Press OK to Continue"

Name1 = ActiveDocument.Variables("vFolderName").GetContent.String

Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open _
    (Name1)

intRow = 2

Do Until objExcel.Cells(intRow,1).Value = ""

	Set var_TimeStamp = ActiveDocument.Variables("var_TimeStamp")
	Set var_TEST_NO = ActiveDocument.Variables("var_TEST_NO")

	var_TimeStamp = objExcel.Cells(intRow, 1).Value
	var_TEST_NO = objExcel.Cells(intRow, 2).Value
	
    SET Result = ActiveDocument.DynamicUpdateCommand ("INSERT INTO * (TimeStamp, TEST_NO) VALUES ('"&amp;amp;var_TimeStamp&amp;amp;"','"&amp;amp;var_TEST_NO&amp;amp;"')")
    
 	if Result = false then
  		MsgBox Result.ErrorMessage
	end if  
  
	intRow = intRow + 1
Loop

objExcel.Quit

 MsgBox "Import Complete"

End Sub&lt;/PRE&gt;&lt;P&gt;However, I am only able to import excel files that are .xlsx only. Is there a way to change it to allow for .csv as well?&lt;/P&gt;&lt;P&gt;Also, when someone else imports the same data as me, the date fields are seperated. For example, there are multiple 1/1/19 instead of only one. But on mine it combines them all. I would really appreciate any help.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Apr 2019 14:39:47 GMT</pubDate>
    <dc:creator>lockematthewp</dc:creator>
    <dc:date>2019-04-17T14:39:47Z</dc:date>
    <item>
      <title>Import From Excel Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Import-From-Excel-Macro/m-p/1570611#M442083</link>
      <description>&lt;P&gt;I am currently using the following macros to browse for a file and import it:&lt;/P&gt;&lt;PRE&gt;Sub BrowseFolder
	 Const OverWrite = True
	 Dim destpath,  srcFiles
     Set objShell = CreateObject("Shell.Application")
     Set objFolder = objShell.BrowseForFolder(0, "Example", 16384,"Computer")
       On Error Resume Next
           If objFolder Is Nothing Then
          Wscript.Quit
     End If

 	 ActiveDocument.Variables("vFileName").SetContent objFolder.title, true
	 ActiveDocument.Variables("vFolderName").SetContent objFolder.self.path, true    
 
End Sub





Sub Import

MsgBox "Importing... Press OK to Continue"

Name1 = ActiveDocument.Variables("vFolderName").GetContent.String

Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open _
    (Name1)

intRow = 2

Do Until objExcel.Cells(intRow,1).Value = ""

	Set var_TimeStamp = ActiveDocument.Variables("var_TimeStamp")
	Set var_TEST_NO = ActiveDocument.Variables("var_TEST_NO")

	var_TimeStamp = objExcel.Cells(intRow, 1).Value
	var_TEST_NO = objExcel.Cells(intRow, 2).Value
	
    SET Result = ActiveDocument.DynamicUpdateCommand ("INSERT INTO * (TimeStamp, TEST_NO) VALUES ('"&amp;amp;var_TimeStamp&amp;amp;"','"&amp;amp;var_TEST_NO&amp;amp;"')")
    
 	if Result = false then
  		MsgBox Result.ErrorMessage
	end if  
  
	intRow = intRow + 1
Loop

objExcel.Quit

 MsgBox "Import Complete"

End Sub&lt;/PRE&gt;&lt;P&gt;However, I am only able to import excel files that are .xlsx only. Is there a way to change it to allow for .csv as well?&lt;/P&gt;&lt;P&gt;Also, when someone else imports the same data as me, the date fields are seperated. For example, there are multiple 1/1/19 instead of only one. But on mine it combines them all. I would really appreciate any help.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 14:39:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Import-From-Excel-Macro/m-p/1570611#M442083</guid>
      <dc:creator>lockematthewp</dc:creator>
      <dc:date>2019-04-17T14:39:47Z</dc:date>
    </item>
  </channel>
</rss>

