Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
#61969
Boa tarde Amigos. Eu criei este código para que em cada linha do excel seja extraídas algumas tags específicas de um arquivo XML, e ele me atende. No entanto, preciso conseguir importar de vários arquivos XMLs e não de apenas uma única nota, como é o caso deste.

Estou anexando 3 XMLs para testar.

Em Ferramentas/Referência/ marquei a opção Microsoft XML, v3.0
Sub IMPORTAR()
Dim XML As MSXML2.DOMDocument30
Set XML = New MSXML2.DOMDocument30
Dim Arquivo As Variant

Arquivo = Application.GetOpenFilename("")

If Not XML.Load(Arquivo) Then
Set XML = Nothing
End If

Dim L As Long
L = 1

Cells(1, 1) = XML.SelectSingleNode("//ide/nNF").Text
Cells(1, 2) = XML.SelectSingleNode("//ide/dhEmi").Text
Cells(1, 3) = XML.SelectSingleNode("//emit/xFant").Text
Cells(1, 4) = XML.SelectSingleNode("//dest/xNome").Text
Cells(1, 5) = XML.SelectSingleNode("//total/ICMSTot/vNF").Text
End sub
Você não está autorizado a ver ou baixar esse anexo.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord