PDA

View Full Version : Filtering multiline data prior to dumping into cell



john3j
05-08-2015, 04:51 AM
Excel 2010 has a limit of 32,767 characters for a single cell within a workbook. I am using code to parse xml data as follows:


Set MyNode = oXMLFile.SelectSingleNode("/NessusClientData_v2/Report/ReportHost/ReportItem[@pluginID='20811']/plugin_output")
If Not MyNode Is Nothing Then
If InStr(MyNode.Text, "The following software are installed on the remote host") > 0 Then
Soft = Split(MyNode.Text, "software are installed on the remote host :")(1)
Else
Soft = MyNode.Text
End If
End If

I then use the following statement to output the data into a cell:


.Range("B3").Value = Soft

The problem is that the output is multiline data, so I am wondering if there is a way to filter the data before it gets dumped into the cell. So, for any line that begin with "Security Update", "Hotfix for", or "Update for", would be omitted prior to dumping into cell B3.

I would appreciate any help that you can provide!