IMPORTAR PRODUTOS DO XML DA NFE EM VB6

 Tópico anterior Próximo tópico Novo tópico

IMPORTAR PRODUTOS DO XML DA NFE EM VB6

VB / VBA

 Compartilhe  Compartilhe  Compartilhe
#470394 - 05/01/2017 12:31:49

MOREIRA
SAO LUIS - TURU
Cadast. em:Agosto/2004


Bom dia, algum dos amigos podem ajudar,

já tenho um sistema em vb6, só preciso implementar a importação do arquivo XML para algum grid.

algum caminho das pedras aí, por favor.....    

Eu não nasci, fui Compilado

Resposta escolhida #470405 - 05/01/2017 15:28:21

FABRICIOWEB
BELO HORIZONTE
Cadast. em:Novembro/2011


 Anexos estao visíveis somente para usuários registrados

Montei um projetinho veja se te ajuda, se sim finalize o topico



#470428 - 05/01/2017 18:51:55

MOREIRA
SAO LUIS - TURU
Cadast. em:Agosto/2004


Última edição em 05/01/2017 18:53:33 por MOREIRA

Fabricio, obrigado pela iniciativa.

Você colocou umas tags como referência. de itens na grid.

fiquei perdido como eu atribuir as tags da nota fiscal.. essa aqui que estou colocando abaixo.. do arquivo XML



  <?xml version="1.0" encoding="UTF-8"?><nfeProc xmlns="http://www.portalfiscal.inf.br/nfe" versao="3.10"><NFe xmlns="http://www.portalfiscal.inf.br/nfe"><infNFe Id="NFe42160984043009000170550010007042981007042982" versao="3.10"><ide><cUF>42</cUF><cNF>00704298</cNF><natOp>Venda Producao do Estabelecim.</natOp><indPag>1</indPag><mod>55</mod><serie>1</serie><nNF>704298</nNF><dhEmi>2016-09-21T00:00:00-03:00</dhEmi><tpNF>1</tpNF><idDest>2</idDest><cMunFG>4205902</cMunFG><tpImp>1</tpImp><tpEmis>1</tpEmis><cDV>2</cDV><tpAmb>1</tpAmb><finNFe>1</finNFe><indFinal>0</indFinal><indPres>9</indPres><procEmi>0</procEmi><verProc>7.14.2</verProc></ide><emit><CNPJ>84043009000170</CNPJ><xNome>CIRCULO S.A.</xNome><enderEmit><xLgr>RUA DR. NEREU RAMOS</xLgr><nro>360</nro><xBairro>CENTRO</xBairro><cMun>4205902</cMun><xMun>GASPAR</xMun><UF>SC</UF><CEP>89110902</CEP><cPais>1058</cPais><xPais>BRASIL</xPais><fone>4733319500</fone></enderEmit><IE>250043025</IE><IM>86</IM><CNAE>1314600</CNAE><CRT>3</CRT></emit><dest><CNPJ>08459856000131</CNPJ><xNome>NC FERNANDES ALVES</xNome><enderDest><xLgr>AV GOVERNADOR ANTONIO DINO</xLgr><nro>295</nro><xBairro>CENTRO</xBairro><cMun>2106805</cMun><xMun>MIRINZAL</xMun><UF>MA</UF><CEP>65265000</CEP><cPais>1058</cPais><xPais>BRASIL</xPais><fone>9833991321</fone></enderDest><indIEDest>1</indIEDest><IE>122320360</IE><email>ncfernandesalves@hotmail.com</email></dest><det nItem="1"><prod><cProd>51.8001</cProd><cEAN>7891113308014</cEAN><xProd>ANNE 500 - COR BRANCO PUB</xProd><NCM>52071000</NCM><CFOP>6101</CFOP><uCom>NV</uCom><qCom>12.0000</qCom><vUnCom>7.95</vUnCom><vProd>95.40</vProd><cEANTrib>7891113308014</cEANTrib><uTrib>NV</uTrib><qTrib>12.0000</qTrib><vUnTrib>7.95</vUnTrib><vDesc>95.40</vDesc><indTot>1</indTot></prod><imposto><ICMS><ICMS00><orig>0</orig><CST>00</CST><modBC>3</modBC><vBC>0</vBC><pICMS>7.00</pICMS><vICMS>0</vICMS></ICMS00></ICMS><IPI><cEnq>999</cEnq><IPINT><CST>51</CST></IPINT></IPI><PIS><PISAliq><CST>01</CST><vBC>0</vBC><pPIS>1.65</pPIS><vPIS>0</vPIS></PISAliq></PIS><COFINS><COFINSAliq><CST>01</CST><vBC>0</vBC><pCOFINS>7.60</pCOFINS><vCOFINS>0</vCOFINS></COFINSAliq></COFINS></imposto><infAdProd>FIO CONTENDO: 100.00% ALGODAO</infAdProd></det><det nItem="2"><prod><cProd>186481.8001</cProd><cEAN>7891113566582</cEAN><xProd>LIZA FINA - COR BRANCO</xProd><NCM>54060010</NCM><CFOP>6101</CFOP><uCom>CN</uCom><qCom>100.0000</qCom><vUnCom>2.69</vUnCom><vProd>269.00</vProd><cEANTrib>7891113566582</cEANTrib><uTrib>CN</uTrib><qTrib>100.0000</qTrib><vUnTrib>2.69</vUnTrib><indTot>1</indTot></prod><imposto><ICMS><ICMS00><orig>0</orig><CST>00</CST><modBC>3</modBC><vBC>269.00</vBC><pICMS>7.00</pICMS><vICMS>18.83</vICMS></ICMS00></ICMS><IPI><cEnq>999</cEnq><IPINT><CST>51</CST></IPINT></IPI><PIS><PISAliq><CST>01</CST><vBC>269.00</vBC><pPIS>1.65</pPIS><vPIS>4.44</vPIS></PISAliq></PIS><COFINS><COFINSAliq><CST>01</CST><vBC>269.00</vBC><pCOFINS>7.60</pCOFINS><vCOFINS>20.44</vCOFINS></COFINSAliq></COFINS></imposto><infAdProd>FIO CONTENDO: 100.00% POLIPROPILENO</infAdProd></det><det nItem="3"><prod><cProd>186490.1198</cProd><cEAN>7891113566988</cEAN><xProd>LIZA GROSSA - COR 1198</xProd><NCM>54060010</NCM><CFOP>6101</CFOP><uCom>CN</uCom><qCom>30.0000</qCom><vUnCom>3.97</vUnCom><vProd>119.10</vProd><cEANTrib>7891113566988</cEANTrib><uTrib>CN</uTrib><qTrib>30.0000</qTrib><vUnTrib>3.97</vUnTrib><indTot>1</indTot></prod><imposto><ICMS><ICMS00><orig>0</orig><CST>00</CST><modBC>3</modBC><vBC>119.10</vBC><pICMS>7.00</pICMS><vICMS>8.33</vICMS></ICMS00></ICMS><IPI><cEnq>999</cEnq><IPINT><CST>51</CST></IPINT></IPI><PIS><PISAliq><CST>01</CST><vBC>119.10</vBC><pPIS>1.65</pPIS><vPIS>1.97</vPIS></PISAliq></PIS><COFINS><COFINSAliq><CST>01</CST><vBC>119.10</vBC><pCOFINS>7.60</pCOFINS><vCOFINS>9.05</vCOFINS></COFINSAliq></COFINS></imposto><infAdProd>FIO CONTENDO: 100.00% POLIPROPILENO</infAdProd></det><det nItem="4"><prod><cProd>186490.2151</cProd><cEAN>7891113567060</cEAN><xProd>LIZA GROSSA - COR 2151</xProd><NCM>54060010</NCM><CFOP>6101</CFOP><uCom>CN</uCom><qCom>30.0000</qCom><vUnCom>3.97</vUnCom><vProd>119.10</vProd><cEANTrib>7891113567060</cEANTrib><uTrib>CN</uTrib><qTrib>30.0000</qTrib><vUnTrib>3.97</vUnTrib><indTot>1</indTot></prod><imposto><ICMS><ICMS00><orig>0</orig><CST>00</CST><modBC>3</modBC><vBC>119.10</vBC><pICMS>7.00</pICMS><vICMS>8.33</vICMS></ICMS00></ICMS><IPI><cEnq>999</cEnq><IPINT><CST>51</CST></IPINT></IPI><PIS><PISAliq><CST>01</CST><vBC>119.10</vBC><pPIS>1.65</pPIS><vPIS>1.97</vPIS></PISAliq></PIS><COFINS><COFINSAliq><CST>01</CST><vBC>119.10</vBC><pCOFINS>7.60</pCOFINS><vCOFINS>9.05</vCOFINS></COFINSAliq></COFINS></imposto><infAdProd>FIO CONTENDO: 100.00% POLIPROPILENO</infAdProd></det><det nItem="5"><prod><cProd>186490.2207</cProd><cEAN>7891113567084</cEAN><xProd>LIZA GROSSA - COR 2207</xProd><NCM>54060010</NCM><CFOP>6101</CFOP><uCom>CN</uCom><qCom>30.0000</qCom><vUnCom>3.97</vUnCom><vProd>119.10</vProd><cEANTrib>7891113567084</cEANTrib><uTrib>CN</uTrib><qTrib>30.0000</qTrib><vUnTrib>3.97</vUnTrib><indTot>1</indTot></prod><imposto><ICMS><ICMS00><orig>0</orig><CST>00</CST><modBC>3</modBC><vBC>119.10</vBC><pICMS>7.00</pICMS><vICMS>8.33</vICMS></ICMS00></ICMS><IPI><cEnq>999</cEnq><IPINT><CST>51</CST></IPINT></IPI><PIS><PISAliq><CST>01</CST><vBC>119.10</vBC><pPIS>1.65</pPIS><vPIS>1.97</vPIS></PISAliq></PIS><COFINS><COFINSAliq><CST>01</CST><vBC>119.10</vBC><pCOFINS>7.60</pCOFINS><vCOFINS>9.05</vCOFINS></COFINSAliq></COFINS></imposto><infAdProd>FIO CONTENDO: 100.00% POLIPROPILENO</infAdProd></det><det nItem="6"><prod><cProd>186490.3559</cProd><cEAN>7891113567329</cEAN><xProd>LIZA GROSSA - COR 3559</xProd><NCM>54060010</NCM><CFOP>6101</CFOP><uCom>CN</uCom><qCom>30.0000</qCom><vUnCom>3.97</vUnCom><vProd>119.10</vProd><cEANTrib>7891113567329</cEANTrib><uTrib>CN</uTrib><qTrib>30.0000</qTrib><vUnTrib>3.97</vUnTrib><indTot>1</indTot></prod><imposto><ICMS><ICMS00><orig>0</orig><CST>00</CST><modBC>3</modBC><vBC>119.10</vBC><pICMS>7.00</pICMS><vICMS>8.33</vICMS></ICMS00></ICMS><IPI><cEnq>999</cEnq><IPINT><CST>51</CST></IPINT></IPI><PIS><PISAliq><CST>01</CST><vBC>119.10</vBC><pPIS>1.65</pPIS><vPIS>1.97</vPIS></PISAliq></PIS><COFINS><COFINSAliq><CST>01</CST><vBC>119.10</vBC><pCOFINS>7.60</pCOFINS><vCOFINS>9.05</vCOFINS></COFINSAliq></COFINS></imposto><infAdProd>FIO CONTENDO: 100.00% POLIPROPILENO</infAdProd></det><det nItem="7"><prod><cProd>186490.4484</cProd><cEAN>7891113567466</cEAN><xProd>LIZA GROSSA - COR 4484</xProd><NCM>54060010</NCM><CFOP>6101</CFOP><uCom>CN</uCom><qCom>30.0000</qCom><vUnCom>3.97</vUnCom><vProd>119.10</vProd><cEANTrib>7891113567466</cEANTrib><uTrib>CN</uTrib><qTrib>30.0000</qTrib><vUnTrib>3.97</vUnTrib><indTot>1</indTot></prod><imposto><ICMS><ICMS00><orig>0</orig><CST>00</CST><modBC>3</modBC><vBC>119.10</vBC><pICMS>7.00</pICMS><vICMS>8.33</vICMS></ICMS00></ICMS><IPI><cEnq>999</cEnq><IPINT><CST>51</CST></IPINT></IPI><PIS><PISAliq><CST>01</CST><vBC>119.10</vBC><pPIS>1.65</pPIS><vPIS>1.97</vPIS></PISAliq></PIS><COFINS><COFINSAliq><CST>01</CST><vBC>119.10</vBC><pCOFINS>7.60</pCOFINS><vCOFINS>9.05</vCOFINS></COFINSAliq></COFINS></imposto><infAdProd>FIO CONTENDO: 100.00% POLIPROPILENO</infAdProd></det><det nItem="8"><prod><cProd>186490.5806</cProd><cEAN>7891113567626</cEAN><xProd>LIZA GROSSA - COR 5806</xProd><NCM>54060010</NCM><CFOP>6101</CFOP><uCom>CN</uCom><qCom>30.0000</qCom><vUnCom>3.97</vUnCom><vProd>119.10</vProd><cEANTrib>7891113567626</cEANTrib><uTrib>CN</uTrib><qTrib>30.0000</qTrib><vUnTrib>3.97</vUnTrib><indTot>1</indTot></prod><imposto><ICMS><ICMS00><orig>0</orig><CST>00</CST><modBC>3</modBC><vBC>119.10</vBC><pICMS>7.00</pICMS><vICMS>8.33</vICMS></ICMS00></ICMS><IPI><cEnq>999</cEnq><IPINT><CST>51</CST></IPINT></IPI><PIS><PISAliq><CST>01</CST><vBC>119.10</vBC><pPIS>1.65</pPIS><vPIS>1.97</vPIS></PISAliq></PIS><COFINS><COFINSAliq><CST>01</CST><vBC>119.10</vBC><pCOFINS>7.60</pCOFINS><vCOFINS>9.05</vCOFINS></COFINSAliq></COFINS></imposto><infAdProd>FIO CONTENDO: 100.00% POLIPROPILENO</infAdProd></det><det nItem="9"><prod><cProd>186490.6092</cProd><cEAN>7891113567664</cEAN><xProd>LIZA GROSSA - COR 6092</xProd><NCM>54060010</NCM><CFOP>6101</CFOP><uCom>CN</uCom><qCom>30.0000</qCom><vUnCom>3.97</vUnCom><vProd>119.10</vProd><cEANTrib>7891113567664</cEANTrib><uTrib>CN</uTrib><qTrib>30.0000</qTrib><vUnTrib>3.97</vUnTrib><indTot>1</indTot></prod><imposto><ICMS><ICMS00><orig>0</orig><CST>00</CST><modBC>3</modBC><vBC>119.10</vBC><pICMS>7.00</pICMS><vICMS>8.33</vICMS></ICMS00></ICMS><IPI><cEnq>999</cEnq><IPINT><CST>51</CST></IPINT></IPI><PIS><PISAliq><CST>01</CST><vBC>119.10</vBC><pPIS>1.65</pPIS><vPIS>1.97</vPIS></PISAliq></PIS><COFINS><COFINSAliq><CST>01</CST><vBC>119.10</vBC><pCOFINS>7.60</pCOFINS><vCOFINS>9.05</vCOFINS></COFINSAliq></COFINS></imposto><infAdProd>FIO CONTENDO: 100.00% POLIPROPILENO</infAdProd></det><det nItem="10"><prod><cProd>186490.6183</cProd><cEAN>7891113584487</cEAN><xProd>LIZA GROSSA - COR 6183</xProd><NCM>54060010</NCM><CFOP>6101</CFOP><uCom>CN</uCom><qCom>30.0000</qCom><vUnCom>3.97</vUnCom><vProd>119.10</vProd><cEANTrib>7891113584487</cEANTrib><uTrib>CN</uTrib><qTrib>30.0000</qTrib><vUnTrib>3.97</vUnTrib><indTot>1</indTot></prod><imposto><ICMS><ICMS00><orig>0</orig><CST>00</CST><modBC>3</modBC><vBC>119.10</vBC><pICMS>7.00</pICMS><vICMS>8.33</vICMS></ICMS00></ICMS><IPI><cEnq>999</cEnq><IPINT><CST>51</CST></IPINT></IPI><PIS><PISAliq><CST>01</CST><vBC>119.10</vBC><pPIS>1.65</pPIS><vPIS>1.97</vPIS></PISAliq></PIS><COFINS><COFINSAliq><CST>01</CST><vBC>119.10</vBC><pCOFINS>7.60</pCOFINS><vCOFINS>9.05</vCOFINS></COFINSAliq></COFINS></imposto><infAdProd>FIO CONTENDO: 100.00% POLIPROPILENO</infAdProd></det><det nItem="11"><prod><cProd>186490.7393</cProd><cEAN>7891113629904</cEAN><xProd>LIZA GROSSA - COR 7393</xProd><NCM>54060010</NCM><CFOP>6101</CFOP><uCom>CN</uCom><qCom>30.0000</qCom>

Eu não nasci, fui Compilado

#470434 - 06/01/2017 17:10:33

FABRICIOWEB
BELO HORIZONTE
Cadast. em:Novembro/2011


 Anexos estao visíveis somente para usuários registrados

testado e funcionando
se for util para vc finalize o tópico




#470462 - 08/01/2017 12:04:13

MOREIRA
SAO LUIS - TURU
Cadast. em:Agosto/2004


Última edição em 08/01/2017 12:07:19 por MOREIRA

Bom dia,Amigos, já conseguir com ajuda,

listar os produto já consigo, nao sei se está correto, os impostos coloquei uma parte.

agora preciso internder como mostrar  o número da nota, as faturas, o fornecedor....


OBS: claro, não está com boas práticas, mas aceito sugestões

assim ficou como na imagem







  Option Explicit
Dim Rst As New ADODB.Recordset
Dim Sql As String
'Dim i As Integer

Private Sub Command3_Click()
Dim arq As String
'arq = Dir(App.Path & "\Dados\*.xml")
'Do While arq <> ""
End Sub

Private Sub BtnNotaFiscal_Click()
On Error Resume Next
    Dim doc As DOMDocument60, Temp(3) As String
    Set doc = New DOMDocument60
  
    Dim cprod As String, nitem As String, vuncom As String, qcom As String, xprod As String, vprod As String, cEAN As String
    Dim CFOP As String, NCM As String
    Dim sBn As String, uCom As String
    Dim qtdProd As String
    
    Dim vipi As String
    Dim vicmsst As String
    Dim vfrete As String
    Dim vicmsdeson As String
    Dim pICMS As String
    Dim vbc As String
    Dim vICMS As String
    Dim voutro As String
    Dim vdesc As String
    Dim vseg As String
    Dim nNF As String
    
    Dim Caminho As String
    Dim XMLdoc As Object
    Dim i As Integer
    Dim CountRow As Integer
    Set XMLdoc = CreateObject("Microsoft.XMLDOM")
    XMLdoc.async = False
   'Caminho = "caminho da sua nota fiscal completo"
    Caminho = "C:\Dados\WS_000000127243186_21150510369130000150550010002488711111019055.xml"
    XMLdoc.Load (Caminho)

    qtdProd = XMLdoc.getElementsByTagName(sBn & "infNFe/det").length 'Contando quantos itens tem o nó det (detalhes)
    FlexGrid.Clear
    For i = 1 To qtdProd - 1 'Varrendo todos os itens
        cprod = CStr(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("prod/cProd").Item(0).text)
        nitem = CStr(XMLdoc.getElementsByTagName("nfeProc/NFe/infNFe/det").Item(i).Attributes(0).Value)
        vuncom = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("prod/vUnCom").Item(0).text, ".", ",")
        qcom = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("prod/qCom").Item(0).text, ".", ",")
        xprod = CStr(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("prod/xProd").Item(0).text)
        vprod = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("prod/vProd").Item(0).text, ".", ",")
        cEAN = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("prod/cEAN").Item(0).text, ".", ",")
        CFOP = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("prod/CFOP").Item(0).text, ".", ",")
        NCM = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("prod/NCM").Item(0).text, ".", ",")
        uCom = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("prod/uCom").Item(0).text, ".", ",")
        qcom = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("prod/qcom").Item(0).text, ".", ",")
        vuncom = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("prod/vuncom").Item(0).text, ".", ",")
        
        If XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("imposto/ICMS").length > 0 Then
           pICMS = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("imposto/ICMS/ICMS00").Item(0).getElementsByTagName("pICMS").Item(0).text, ".", ",")
        End If
        
        'If XMLdoc.selectNodes("nfeProc/NFe /infNFe/det").Item(i).getElementsByTagName("vICMSST").length > 0 Then
        '   vicmsst = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).getElementsByTagName("vICMSST").Item(0).text, ".", ",")
        'End If

        'If XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).getElementsByTagName("vFrete").length > 0 Then
        '    vfrete = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).getElementsByTagName("vFrete").Item(0).text, ".", ",")
        'End If
        
        'If XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).getElementsByTagName("vICMSDeson").length > 0 Then
        '    vicmsdeson = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).getElementsByTagName("vICMSDeson").Item(0).text, ".", ",")
        'End If
      
        'If XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).childNodes(1).childNodes(0).childNodes(0).selectNodes("pICMS").length > 0 Then
        '   pICMS = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).childNodes(1).childNodes(0).childNodes(0).selectNodes("pICMS").Item(0).text, ".", ",") / 100
        'End If
        
        'If XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).childNodes(1).childNodes(0).childNodes(0).selectNodes("vBC").length > 0 Then
        '    vbc = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).childNodes(1).childNodes(0).childNodes(0).selectNodes("vBC").Item(0).text, ".", ",")
        'End If
        
        'If XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).childNodes(1).childNodes(0).childNodes(0).selectNodes("vICMS").length > 0 Then
        '    vICMS = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).childNodes(1).childNodes(0).childNodes(0).selectNodes("vICMS").Item(0).text, ".", ",")
        'End If
        
        'If XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("prod/vOutro").length > 0 Then
        '    voutro = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("prod/vOutro").Item(0).text, ".", ",")
        'End If
        
        'If XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("prod/vDesc").length > 0 Then
        '    vdesc = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("prod/vDesc").Item(0).text, ".", ",")
        'End If
        
        'If XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("prod/vSeg").length > 0 Then
        '    vseg = Replace(XMLdoc.selectNodes("nfeProc/NFe/infNFe/det").Item(i).selectNodes("prod/vSeg").Item(0).text, ".", ",")
        'End If

        With FlexGrid
            .Rows = .Rows + 1
             CountRow = CountRow + 1
            .CellDetails .Rows, 1, cprod
            .CellDetails .Rows, 2, xprod
            .CellDetails .Rows, 3, qcom, DT_RIGHT 'Unid
            .CellDetails .Rows, 4, uCom, DT_RIGHT 'Quant
            .CellDetails .Rows, 5, Format(vuncom, "###,##0.00"), DT_RIGHT 'Valor Unitário
            .CellDetails .Rows, 6, Format(vprod, "###,##0.00"), DT_RIGHT
            .CellDetails .Rows, 7, nitem, DT_CENTER
            .CellDetails .Rows, 8, cEAN, DT_CENTER
            .CellDetails .Rows, 9, CFOP, DT_CENTER
            .CellDetails .Rows, 10, NCM, DT_LEFT
            
            .CellDetails .Rows, 11, vipi
            .CellDetails .Rows, 12, vicmsst
            .CellDetails .Rows, 13, vfrete
            .CellDetails .Rows, 14, vicmsdeson
            .CellDetails .Rows, 15, pICMS
            .CellDetails .Rows, 16, vbc
            .CellDetails .Rows, 17, vICMS
            .CellDetails .Rows, 18, voutro
            .CellDetails .Rows, 19, vdesc
            .CellDetails .Rows, 20, nNF
            
             Rst.MoveNext
        End With
    Next i
    Set XMLdoc = Nothing

End Sub

Private Sub chameleonButton1_Click()

End Sub

Private Sub Form_Load()

    With FlexGrid
        .AddColumn 1, "Id", , , 80
        .AddColumn 2, "Descrição", ecgHdrTextALignLeft, , 500
        .AddColumn 3, "Quant", ecgHdrTextALignRight, , 80
        .AddColumn 4, "UN", ecgHdrTextALignCentre, , 40
        .AddColumn 5, "V. Unit.", ecgHdrTextALignRight, , 100
        .AddColumn 6, "V. Total", ecgHdrTextALignRight, , 100
        .AddColumn 7, "Item", ecgHdrTextALignCentre, , 0
        .AddColumn 8, "Cód.Barra", ecgHdrTextALignCentre, , 150
        .AddColumn 9, "CFOP", ecgHdrTextALignCentre, , 70
        .AddColumn 10, "NCM", ecgHdrTextALignLeft, , 80
        
        '**************************************************
        .AddColumn 11, "Desc", ecgHdrTextALignLeft, , 80
        .AddColumn 12, "Cód. ST", ecgHdrTextALignLeft, , 80
        .AddColumn 13, "ICMS", ecgHdrTextALignLeft, , 80
        .AddColumn 14, "IPI", ecgHdrTextALignLeft, , 80
        .AddColumn 15, "ICMS", ecgHdrTextALignLeft, , 80
        .AddColumn 16, "Cofins", ecgHdrTextALignLeft, , 80
        .AddColumn 17, "IPI", ecgHdrTextALignLeft, , 80
        .AddColumn 18, "PIS", ecgHdrTextALignLeft, , 80
        .AddColumn 19, "Cofins", ecgHdrTextALignLeft, , 80
        .AddColumn 20, "Cofins", ecgHdrTextALignLeft, , 80
    End With
    
    With FlexFGrid
        .AddColumn 1, "Id", , , 0
        .AddColumn 2, "Vencto", ecgHdrTextALignLeft, , 100
        .AddColumn 3, "Vlr.", ecgHdrTextALignRight, , 100
        .AddColumn 4, "Núm. Duplic", ecgHdrTextALignLeft, , 120
    End With
    
End Sub





Eu não nasci, fui Compilado

#470507 - 09/01/2017 14:07:15

FABRICIOWEB
BELO HORIZONTE
Cadast. em:Novembro/2011


 Anexos estao visíveis somente para usuários registrados

Que dia você vai me dar a nota. Ve se e isso oque você quer e qual a proxima duvida



#470508 - 09/01/2017 14:09:00

FABRICIOWEB
BELO HORIZONTE
Cadast. em:Novembro/2011


 Anexos estao visíveis somente para usuários registrados

Imagem do exemplo que postei acima



#470565 - 10/01/2017 13:47:26

MOREIRA
SAO LUIS - TURU
Cadast. em:Agosto/2004


Bom Tarde todos, FABRICIOWEB, cnforme o exemplo que mandou, já tente, tentei. mas as tag não esta recebendo os Valores do emitente.. e os valores dos impostos..]]

já quebrei a cabeça aqui pra funcionar.. vi que na imagem que mandou esta carregando esses campo.....  

Eu não nasci, fui Compilado

#470568 - 10/01/2017 14:15:07

FABRICIOWEB
BELO HORIZONTE
Cadast. em:Novembro/2011


me fale quais os campos que você precisa em lista



#470569 - 10/01/2017 14:22:46

FUTURA
.
Cadast. em:Maio/2004


testei aqui o exemplo do fabricio, e notas com 1 produto não pegou por causa do for começar em 1 até qtde -1, coloquei zero e carregou, mas não notei se foram todos os campos..

edson

#470570 - 10/01/2017 14:30:32

FABRICIOWEB
BELO HORIZONTE
Cadast. em:Novembro/2011


acho que ele deve estar usando xml 6 na referencia deve ser usado xml 4



 Tópico anterior Próximo tópico Novo tópico


Tópico encerrado, respostas não sao permitidas
Encerrado por MOREIRA em 04/04/2017 07:58:47