john3j
05-14-2015, 10:08 AM
I am trying to parse xml files either one at a time or in bulk, which p45cal helped me do in another project. The problem is that I am trying to dump the output from each .nessus file into a new row on the worksheet. When I run the single file multiple times, or process in bulk, I end up getting the appropriate number of rows populated, but each of the rows overwrites with the latest .nessus file's output. So, each row ends up with the same data in it. Can anyone help me out?
Here is my code:
Sub populateRows(HostName, Manufacturer, ModelNum, BiosVer, SerialNum, IPAddress, OSID)
Dim j As Long
For j = 2 To Cells(Rows.Count, "A").End(xlUp).Row + 1
Sheets("Hardware List").Cells(j, "a").Value = HostName
Sheets("Hardware List").Cells(j, "b").Value = Manufacturer
Sheets("Hardware List").Cells(j, "c").Value = ModelNum
Sheets("Hardware List").Cells(j, "d").Value = BiosVer
Sheets("Hardware List").Cells(j, "h").Value = SerialNum
Sheets("Hardware List").Cells(j, "i").Value = IPAddress
Sheets("Hardware List").Cells(j, "j").Value = OSID
Next j
End Sub
13395
Any help would be appreciated.
Here is my code:
Sub populateRows(HostName, Manufacturer, ModelNum, BiosVer, SerialNum, IPAddress, OSID)
Dim j As Long
For j = 2 To Cells(Rows.Count, "A").End(xlUp).Row + 1
Sheets("Hardware List").Cells(j, "a").Value = HostName
Sheets("Hardware List").Cells(j, "b").Value = Manufacturer
Sheets("Hardware List").Cells(j, "c").Value = ModelNum
Sheets("Hardware List").Cells(j, "d").Value = BiosVer
Sheets("Hardware List").Cells(j, "h").Value = SerialNum
Sheets("Hardware List").Cells(j, "i").Value = IPAddress
Sheets("Hardware List").Cells(j, "j").Value = OSID
Next j
End Sub
13395
Any help would be appreciated.