Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a file that contains several xlsx spreadsheets
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.
I created the following script, but it's giving NULL, it doesn't give an error, but it doesn't extract any xlsx.
Someone can help me?
set vTableName = '';For Each File In FileList ('$(vCaminhoOrigemDadosOi)/*.xlsx')// LET vTableName = subfield(mid('$(File)', index('$(File)', '\',-1) +1), '.xlsx', 1);
LET vTableName = subfield(mid('$(File)', index('$(File)', '\',-1) +1), '.xlsx', 1);// SubField(SubField(vArquivo, '\', -1), '.'&vExt, 1)LET size = filesize('$(File)');if not isnull(size) then[$(vTableName)]:LOAD [NUM. CHAMADO]&'|'&[DATA SERVICO]&'|'&HORA as Key,[TIPO REG.],[DESCRICAO TIPO],[COD. FILIAL],REFERENCIA,[CNPJ-CPF],CONTRATO,AGRUPADOR,TELEFONE,NOME,[COD. SERVICO],[DESCRICAO DO SERVICO],[NUM. CHAMADO],[DATA SERVICO],HORA,DURACAO,DUR.TARIFARIA,[VALOR LIQUIDO],[VALOR BRUTO],[CNL-ORIGEM],DEG.TARIFARIO,[GRUPO HORARIO],[EOT-ORIGEM],[EOT-DESTINO],CARRIER,TRAFEGO,CICLOFROM[$(vCaminhoOrigemDadosOi)\$(vTableName)].xlsx(ooxml, embedded labels, table is Plan1);
Store [$(vTableName)] into $(vCaminhoDestino)\[$(vTableName)].qvd(qvd);drop Table [$(vTableName)];
END IFNext File;