saulogm / advpl-excel

Classe em ADVPL para criar, ler ou editar planilhas do excel no formato xlsx
https://github.com/saulogm/advpl-excel/wiki
Apache License 2.0
49 stars 23 forks source link

Erro ao iniciar leitura de arquivo #18

Closed andremororo closed 2 years ago

andremororo commented 2 years ago

Ao instanciar YExcel():new(,"E:\TESTE1600ITENS.xlsx"), sistema está gerando errolog apresentando:

variable is not an object on LERCHVSTYS(YEXCEL.PRW) 14/09/2022 16:56:44 line : 926

[TOTVS build: 7.00.210324P-20220608] Called from YEXCEL:NEW(YEXCEL.PRW) 14/09/2022 16:56:44 line : 430 Called from IMPORTAR(TAIMPPROD.PRW) 14/09/2022 16:33:23 line : 257 Called from {|LEND| IMPORTAR( OPROCESS ) }(TAIMPPROD.PRW) 14/09/2022 16:33:23 line : 170 Called from {|| EVAL(SELF:BACTION,@SELF:LEND,@SELF),SELF:LEND := .T. ,SELF:ODLG:END()}(MSNEWPROC.PRW) 08/06/2022 16:53:24 line : 66 Called from ::MSDIALOG:ACTIVATE Called from MSNEWPROCESS:ACTIVATE(MSNEWPROC.PRW) 08/06/2022 16:53:24 line : 68 Called from U_TAIMPPROD(TAIMPPROD.PRW) 14/09/2022 16:33:23 line : 171 Called from SIGAIXB(APLIB190.PRW) 08/06/2022 16:53:22 line : 250 Called from __EXECUTE(APLIB090.PRW) 08/06/2022 16:53:22 line : 656 Called from MDIEXECUTE(APLIB260.PRW) 08/06/2022 16:53:22 line : 924

oStyle está como nulo.

Informacoes importantes:

Build AppServer: 7.00.210324P-20220608 - 64 bits Appserver version: 20.3.0.10 Release do RPO: 12.1.033 Versão da Lib:20220613 Data da Lib: 20220608_165254 Release do dicionário: 12.1.033 Dicionário em Banco de Dados

andremororo commented 2 years ago

O programa consegue copiar a planilha para as pastas do Protheus_Data e consegue descompactar.

andremororo commented 2 years ago

Por algum motivo, o seguinte cenário ocorre no ambiente que estou utilizando:

O conteúdo de aFiles[nCont][5] está como "AD" para diretórios. Precisei contornar o incidente com:

aFiles[nCont][5] $ "D" .or. aFiles[nCont][5] == "AD"

saulogm commented 2 years ago

Obrigado pelo retorno @andremororo , vou atualizar a classe conforme seus testes