Hello
Firstly, I don't think locale settings should affect excution of those scripts unless port id and vlan id are decimal values with locale dependent decimal separator which differs from the one initialized in Script Editor, which is not the case here.
Anyway, if the target rows and even target columns are not constant in your scenario, you might simply copy the target data to the clipboard as TSV text and process the text to create output files. This way, you can easily process partial rows and/or partial columns (by hiding unwanted columns before selecting and copying a range of data).
Here're two scripts you might explore. The first is a mere wrapper of Perl script which I'd prefer and the second is written in AppleScript (mainly) which you'd prefer if you're learning AppleScript. To use them, first copy the source range in table to the clipboard, run the script and it will ask you to choose output directory and then create text file for each switch name in the directory.
E.g., Given source table:

firstly hide unwanted columns (column C in this example) and select source range (not including header row):

and copy it to the clipboard and run one of the following scripts:
--APPLESCRIPT 1
set d to (choose folder)'s POSIX path
do shell script "perl -CSDA -w <<'EOF' - " & d's quoted form & "
#
# ARGV[0] : output directory
#
use strict;
use POSIX qw(strftime);
# (1) get clipboard contents
$ENV{LC_CTYPE} = 'UTF-8';
open(PIPEIN, '-|:utf8', 'pbpaste') or die \"$!\";
my @dd = map {chomp; $_} <PIPEIN>;
close PIPEIN or warn $! ? \"Error closing pipe-in: $!\" : \"Wait status from pipe-in: $?\";
# (2) set output directory and string constants
my $outdir = shift @ARGV || '.';
my $fname = 'Accessport Configuration Script %s.txt';
my $head = <<'EOT';
# Script generated with AppleScript for Switch %s
# at %s
!
conf t
EOT
my $entry = <<'EOT';
!
interface gi 1/0/%d
switch port mode access
switch port access vlan %d
description LINK TO %s
EOT
# (3) process data
my $sw1 = '';
for (@dd) {
my ($sw, $port, $vlan, $desc) = split(/\\t/, $_, -1);
next if $sw =~ /^\\s*$/o;
if ($sw1 ne $sw) {
close OUT if *OUT;
open(OUT, '>:utf8', $outdir . '/' . sprintf($fname, $sw)) or die \"$!\";
printf OUT $head, ($sw, POSIX::strftime('%F %T%z', localtime()));
$sw1 = $sw;
}
printf OUT $entry, ($port, $vlan, $desc);
}
close OUT if *OUT;
EOF"
--END OF APPLESCRIPT 1
--APPLESCRIPT 2
_main(the clipboard as Unicode text)
on _main(argv)
(*
string argv : TSV text of fields as {switch name, port id, vlan id, description}
*)
script o
property aa : _text2array(argv, tab, {return, linefeed})
property dir : (choose folder)'s POSIX path
property fname : "Accessport Configuration Script "
property head : "# Script generated with AppleScript for Switch %s
# at %s
!
conf t
"
property entry : "!
interface gi 1/0/%d
switch port mode access
switch port access vlan %d
description LINK TO %s
"
set sw1 to ""
repeat with a in my aa
repeat 1 times
set a to a's contents
if (count a) < 4 then exit repeat
set {sw, p, vlan, desc} to a
if sw = "" then exit repeat
if sw ≠ sw1 then
set out to dir & fname & sw & ".txt"
_printf(out, head, {sw, (current date) as string}, {_append:false})
set sw1 to sw
end if
_printf(out, entry, {p, vlan, desc}, {_append:true})
end repeat
end repeat
end script
tell o to run
end _main
on _text2array(t, fs, rs)
(*
string t : source text
string fs : column separator (field separator)
string rs : row separator (record separator)
return list : 2d-array represented by t
*)
script o
property pp : _split(t, rs)
property qq : {}
repeat with p in my pp
set end of my qq to _split(p's contents, fs)
end repeat
return my qq's contents
end script
tell o to run
end _text2array
on _split(t, d)
(*
string t : source string
string or list d : separator(s)
return list : t splitted by d
*)
local astid0, tt
try
set {astid0, AppleScript's text item delimiters} to {AppleScript's text item delimiters, {} & d}
set tt to t's text items
set AppleScript's text item delimiters to astid0
on error errs number errn
set AppleScript's text item delimiters to astid0
error errs number errn
end try
return tt
end _split
on _printf(f, fmt, lst, opts)
(*
string f or 1 : POSIX path of output file or file descriptor id (1 = stdout)
string fmt : printf format string
list lst : list of values (if lst is one item list {x}, lst may be x)
record opts : {_append:_append}
boolean _append : true to append data, false to replace data; default false.
*)
local args
set args to ""
repeat with a in {fmt} & lst
set args to args & space & (a as string)'s quoted form
end repeat
set opts to opts & {_append:false}
if f's class = integer then
do shell script "printf " & args & " >&" & f
else
if opts's _append then
do shell script "printf " & args & " >> " & f's quoted form
else
do shell script "printf " & args & " > " & f's quoted form
end if
end if
end _printf
--END OF APPLESCRIPT 2
Briefly tested with Numbers v2.0.5 under OS X 10.6.8.
Good luck,
H