<?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 data from several xlsx files in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Export-data-from-several-xlsx-files/m-p/1689173#M5058</link>
    <description>&lt;P&gt;I have a file that contains several xlsx spreadsheets&lt;/P&gt;&lt;P&gt;I intend to create a routine that takes each file, reads it and stores it in QVD and the name of the QVD will be the name of the file.&lt;/P&gt;&lt;P&gt;I created the following script, but it's giving NULL, it doesn't give an error, but it doesn't extract any xlsx.&lt;/P&gt;&lt;P&gt;Someone can help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;set vTableName = '';&lt;BR /&gt;&lt;BR /&gt;For Each File In FileList ('$(vCaminhoOrigemDadosOi)/*.xlsx')&lt;BR /&gt;&lt;BR /&gt;// LET vTableName = subfield(mid('$(File)', index('$(File)', '\',-1) +1), '.xlsx', 1);&lt;/P&gt;&lt;P&gt;LET vTableName = subfield(mid('$(File)', index('$(File)', '\',-1) +1), '.xlsx', 1);&lt;BR /&gt;&lt;BR /&gt;// SubField(SubField(vArquivo, '\', -1), '.'&amp;amp;vExt, 1)&lt;BR /&gt;LET size = filesize('$(File)');&lt;BR /&gt;&lt;BR /&gt;if not isnull(size) then&lt;BR /&gt;&lt;BR /&gt;[$(vTableName)]:&lt;BR /&gt;LOAD [NUM. CHAMADO]&amp;amp;'|'&amp;amp;[DATA SERVICO]&amp;amp;'|'&amp;amp;HORA as Key,&lt;BR /&gt;[TIPO REG.],&lt;BR /&gt;[DESCRICAO TIPO],&lt;BR /&gt;[COD. FILIAL],&lt;BR /&gt;REFERENCIA,&lt;BR /&gt;[CNPJ-CPF],&lt;BR /&gt;CONTRATO,&lt;BR /&gt;AGRUPADOR,&lt;BR /&gt;TELEFONE,&lt;BR /&gt;NOME,&lt;BR /&gt;[COD. SERVICO],&lt;BR /&gt;[DESCRICAO DO SERVICO],&lt;BR /&gt;[NUM. CHAMADO],&lt;BR /&gt;[DATA SERVICO],&lt;BR /&gt;HORA,&lt;BR /&gt;DURACAO,&lt;BR /&gt;DUR.TARIFARIA,&lt;BR /&gt;[VALOR LIQUIDO],&lt;BR /&gt;[VALOR BRUTO],&lt;BR /&gt;[CNL-ORIGEM],&lt;BR /&gt;DEG.TARIFARIO,&lt;BR /&gt;[GRUPO HORARIO],&lt;BR /&gt;[EOT-ORIGEM],&lt;BR /&gt;[EOT-DESTINO],&lt;BR /&gt;CARRIER,&lt;BR /&gt;TRAFEGO,&lt;BR /&gt;CICLO&lt;BR /&gt;FROM&lt;BR /&gt;[$(vCaminhoOrigemDadosOi)\$(vTableName)].xlsx&lt;BR /&gt;(ooxml, embedded labels, table is Plan1);&lt;/P&gt;&lt;P&gt;Store [$(vTableName)] into $(vCaminhoDestino)\[$(vTableName)].qvd(qvd);&lt;BR /&gt;&lt;BR /&gt;drop Table [$(vTableName)];&lt;/P&gt;&lt;P&gt;END IF&lt;BR /&gt;&lt;BR /&gt;Next File;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Mar 2020 18:36:31 GMT</pubDate>
    <dc:creator>NelsonZyon</dc:creator>
    <dc:date>2020-03-30T18:36:31Z</dc:date>
    <item>
      <title>Export data from several xlsx files</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Export-data-from-several-xlsx-files/m-p/1689173#M5058</link>
      <description>&lt;P&gt;I have a file that contains several xlsx spreadsheets&lt;/P&gt;&lt;P&gt;I intend to create a routine that takes each file, reads it and stores it in QVD and the name of the QVD will be the name of the file.&lt;/P&gt;&lt;P&gt;I created the following script, but it's giving NULL, it doesn't give an error, but it doesn't extract any xlsx.&lt;/P&gt;&lt;P&gt;Someone can help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;set vTableName = '';&lt;BR /&gt;&lt;BR /&gt;For Each File In FileList ('$(vCaminhoOrigemDadosOi)/*.xlsx')&lt;BR /&gt;&lt;BR /&gt;// LET vTableName = subfield(mid('$(File)', index('$(File)', '\',-1) +1), '.xlsx', 1);&lt;/P&gt;&lt;P&gt;LET vTableName = subfield(mid('$(File)', index('$(File)', '\',-1) +1), '.xlsx', 1);&lt;BR /&gt;&lt;BR /&gt;// SubField(SubField(vArquivo, '\', -1), '.'&amp;amp;vExt, 1)&lt;BR /&gt;LET size = filesize('$(File)');&lt;BR /&gt;&lt;BR /&gt;if not isnull(size) then&lt;BR /&gt;&lt;BR /&gt;[$(vTableName)]:&lt;BR /&gt;LOAD [NUM. CHAMADO]&amp;amp;'|'&amp;amp;[DATA SERVICO]&amp;amp;'|'&amp;amp;HORA as Key,&lt;BR /&gt;[TIPO REG.],&lt;BR /&gt;[DESCRICAO TIPO],&lt;BR /&gt;[COD. FILIAL],&lt;BR /&gt;REFERENCIA,&lt;BR /&gt;[CNPJ-CPF],&lt;BR /&gt;CONTRATO,&lt;BR /&gt;AGRUPADOR,&lt;BR /&gt;TELEFONE,&lt;BR /&gt;NOME,&lt;BR /&gt;[COD. SERVICO],&lt;BR /&gt;[DESCRICAO DO SERVICO],&lt;BR /&gt;[NUM. CHAMADO],&lt;BR /&gt;[DATA SERVICO],&lt;BR /&gt;HORA,&lt;BR /&gt;DURACAO,&lt;BR /&gt;DUR.TARIFARIA,&lt;BR /&gt;[VALOR LIQUIDO],&lt;BR /&gt;[VALOR BRUTO],&lt;BR /&gt;[CNL-ORIGEM],&lt;BR /&gt;DEG.TARIFARIO,&lt;BR /&gt;[GRUPO HORARIO],&lt;BR /&gt;[EOT-ORIGEM],&lt;BR /&gt;[EOT-DESTINO],&lt;BR /&gt;CARRIER,&lt;BR /&gt;TRAFEGO,&lt;BR /&gt;CICLO&lt;BR /&gt;FROM&lt;BR /&gt;[$(vCaminhoOrigemDadosOi)\$(vTableName)].xlsx&lt;BR /&gt;(ooxml, embedded labels, table is Plan1);&lt;/P&gt;&lt;P&gt;Store [$(vTableName)] into $(vCaminhoDestino)\[$(vTableName)].qvd(qvd);&lt;BR /&gt;&lt;BR /&gt;drop Table [$(vTableName)];&lt;/P&gt;&lt;P&gt;END IF&lt;BR /&gt;&lt;BR /&gt;Next File;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 18:36:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Export-data-from-several-xlsx-files/m-p/1689173#M5058</guid>
      <dc:creator>NelsonZyon</dc:creator>
      <dc:date>2020-03-30T18:36:31Z</dc:date>
    </item>
  </channel>
</rss>

