Question: I'm trying to check a TSV of results and want to see how many times F and S come up (for failure or success) however I'm not sure how to doing this counting, or how to having it search the file

I've come across something that is sort of what I'm looking for: [Python Program how to count number of times the letter c shows up](https://stackoverflow.com/questions/13103148/python-program-how-to-count-number-of-times-the-letter-c-shows-up)

```
def countletter(S, F): 
    count = 0
    for x in S:
        if x.lower() == F.lower():
            count += 1
    return count

print (countletter("abcdefFf","F"))

```

But it isn't perfect and I'm not sure how to make it search the file.

Answer: 
**Before trying this solution be sure that you read the "Things I've done" paragraph from the question (and tried what applies to you)**

The Exception was thrown upon opening the Document; on the machine which generated the Excels, the files were generated invalid.

The solution was to change the Format of the numbers.

Go into System Configuration -> Time, Language and Region -> Language

![Go into Systemconfiguration -> Time, Language and Region -> Language](https://i.stack.imgur.com/fLoOO.png)

Tap on the highlighted Hyperlink

Open Advanced Settings

![Open Advanced Settings](https://i.stack.imgur.com/ynFuX.png)

Change the delimiter to a point "."
![Change the delimiter to a point "."](https://i.stack.imgur.com/Pzp8j.png)
Sorry - I know this is an indirect answer, although I would recommend you follow on. I personally have very bad experiences with Excel Interop services (ASP.NET application). As I am aware Microsoft [does not recommend Interop server automation](https://support.microsoft.com/en-us/kb/257757?wa=wsignin1.0).

Even if you solve this issue you might stumble into issues with memory leakage, performance etc. In my previous project we were advanced with Excel interop automation until deployment. We stumbled into so many issues (Excel Interop processes not closing properly etc.) that we had to rewrite everything to OpenXML.

**If possible use the new OpenXML format.** There is a [ClosedXML library](https://closedxml.codeplex.com/) that makes working with very easy.

**Why OpenXML vs Interop?:**

1. Efficiency (OpenXML is lightweight)
2. No memory leakage risk
3. Ease of use