IMPORTAR PRODUTOS DO XML DA NFE EM VB6

MOREIRA 05/01/2017 12:31:49
#470394
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.....
FABRICIOWEB 05/01/2017 15:28:21
#470405
Resposta escolhida
Montei um projetinho veja se te ajuda, se sim finalize o topico
MOREIRA 05/01/2017 18:51:55
#470428
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



[c] <?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>
FABRICIOWEB 06/01/2017 17:10:33
#470434
testado e funcionando
se for util para vc finalize o tópico
MOREIRA 08/01/2017 12:04:13
#470462
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


[txt-color=#e80000]
[/txt-color]
FABRICIOWEB 09/01/2017 14:07:15
#470507
Que dia você vai me dar a nota. Ve se e isso oque você quer e qual a proxima duvida
FABRICIOWEB 09/01/2017 14:09:00
#470508
Imagem do exemplo que postei acima
MOREIRA 10/01/2017 13:47:26
#470565
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.....
FABRICIOWEB 10/01/2017 14:15:07
#470568
me fale quais os campos que você precisa em lista
FUTURA 10/01/2017 14:22:46
#470569
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..
FABRICIOWEB 10/01/2017 14:30:32
#470570
acho que ele deve estar usando xml 6 na referencia deve ser usado xml 4
Página 1 de 3 [30 registro(s)]
Tópico encerrado , respostas não são mais permitidas