Question: Attempting to extract text lines from text files to excel, but only if they contain a certain name within the line. Ignoring the rest of the lines.

I'm currently working with a large number of text files containing standardized information for certain products. Each file has the same list of products, but information from different dates. I've put together some code that pulls in each row from the text files contained with the directory, and includes them together in a single excel spreadsheet.

What I would like to change is for the code to only copy over text lines containing a certain name within the line like "Large Cap Index". The rest of the data can be ignored. This is attempting to cut down on the amount of time it takes to pull in the data, since only about 5% of the lines within each text file is needed.

```
Sub ReadFilesIntoActiveSheet()
    Dim fso As FileSystemObject
    Dim folder As folder
    Dim file As file
    Dim FileText As TextStream
    Dim TextLine As String
    Dim Items() As String
    Dim i As Long
    Dim cl As Range
    ' Get a FileSystem object
    Set fso = New FileSystemObject
    ' get the directory you want
    Set folder = fso.GetFolder("C:\Users\crowe12\Desktop\Projects\CRSP\Test")
    Set cl = ActiveSheet.Cells(1, 1)
    For Each file In folder.Files
        Set FileText = file.OpenAsTextStream(ForReading)
        Do While Not FileText.AtEndOfStream
            TextLine = FileText.ReadLine
            Items = Split(TextLine, "|")
            cl.Value = folder & "\" & file.Name
            For i = 0 To UBound(Items)
                cl.Offset(0, i + 1).Value = Items(i)
            Next
            Set cl = cl.Offset(1, 0)
        Loop
        FileText.Close
    Next file
    Set FileText = Nothing
    Set file = Nothing
    Set folder = Nothing
    Set fso = Nothing
End Sub

```

Answer: 
The problem is in data type `Uri downloadUri = task.getResult();` return uri. But may be in firestore DB require string. So, before you update to firestore change downloadUri to string:

```
Uri downloadUri = task.getResult();
String uri = downloadUri.toString();
db.collection("menuitems").document(dbMealItem.CatererId + dbMealItem.name).set(**uri**);

```
For me, it was a typical POJO Cyclic Dependency Issue.

`Parent -> Child -> Parent`

Apart from that, if you are not using `lombok` check your getters too.