I finally got the code to compile with no errors.
When I run it, the code will insert a row in the table "global" in 
cache.
However, it isn't inserting the information in the external database.

From what you describe you have generated a Local Table
as there is a GLOBAL and you write to your local DB. As you have seen.

If you use Link Table Wizzard to create it, then there is just no global.

The correctly generated class looks similar to this:

/// Generated by the Link Table wizard on 2018-05-07 23:20:46.
Note that you can access the data in this class only when the external database is accessible
.

Class GTY.Person Extends %Library.Persistent [. . . . , StorageStrategy = GSQLStorage ]
{
/// Specifies details for the SQL Gateway Connection that this class uses
Parameter CONNECTION = "
. . . . . . ,NOCREATE";
.......

Storage GSQLStorage
{
<StreamLocation>^
####S</StreamLocation>
<Type>%CacheSQLStorage</Type>
}

}

If you do not see the bolded text in your class,
it is not generated by Link Table Wizard and
you are in the wrong Class / Table with no access to he external table.

There is a bunch of useful articles you find here searching for CSV.

I just picked one out of them: 
https://community.intersystems.com/post/how-read-csv-file-contents-objects-cache

In a Windows environment, you may also use an ODBC driver (DSN) and handle
Excel as what it is: As a Table using the SQLgateway as you would to with other DBs

You just have to take care to get the bits matching  (32/64). More details:
https://support.office.com/en-us/article/overview-of-connecting-to-importing-data-c0ad7aec-ff1a-4e48-9c21-dc18a102433f
 

Great!

SAMPLES>w !! do $system.OBJ.ExportUDL("Sample.Company.cls")


/// This sample persistent class represents a company.<br>
Class Sample.Company Extends (%Persistent, %Populate, %XML.Adaptor)
{

/// Define an index for <property>Name</property>.
Index NameIdx On Name [ Type = index ];

/// Define a unique index for <property>TaxID</property>.
Index TaxIDIdx On TaxID [ Type = index, Unique ];

/// The company's name.
Property Name As %String(MAXLEN = 80, POPSPEC = "Company()") [ Required ];

/// The company's mission statement.
Property Mission As %String(MAXLEN = 200, POPSPEC = "Mission()");

/// The unique Tax ID number for the company.
Property TaxID As %String [ Required ];

/// The last reported revenue for the company.
Property Revenue As %Integer;

/// The <class>Employee</class> objects associated with this <class>Company</class>.
Relationship Employees As Employee [ Cardinality = many, Inverse = Company ];

------<skip rest> -------

Thanks for the clarification.
It's sometimes hard to guess the picture if you miss some pixels.

I'd still recommend moving the CLOSE after each inner loop to have OPEN / CLOSE strictly paired

The implicit CLOSE happens only if you exit the partition. There's no class to act undercover. 
Curly braces just structure the code with no operational side effect.

It seems you have manually changed the class definition.

A normal RegisterdObject has no storage definition.
from <Type>%Library.CacheStorage</Type> i see it was a %Rersitent before.

Storage Default
{
<Data name="EOBListDefaultData">
<Subscript>"EOBList"</Subscript>
<Value name="1">
<Value>EOBList</Value>
</Value>
</Data>
<DefaultData>EOBListDefaultData</DefaultData>
<Type>%Library.CacheStorage</Type>
}

remove Storage and recompile.