The reason it's hard for you to notice mistakes is the lack of structure in the worksheet. The Export() calls are inside the wrong loop (one too many inwards). You aren't resetting G to the empty list each time angle1 changes. There are too many calls to with(). Etc.
Start by giving your worksheet some structure.
Indent all your for-do-loops, using nested indentation where necessary.
Place all those calls to with() at the very start of the sheet. Do them just once.
Be careful about in which loop your ExcelTools:-Export calls lie.
You should ideally get rid of G altogether, as augmenting G each time through the loop makes it much slower than it has to be. But if you really want to keep using G, then make sure you reassign G:= at the start of the angle1 loop.
Check whether your simple version above could be written something roughly like the following.
L := Matrix([["j", "i", "c", "b"]]);
M := Matrix(4,4):
for j from 1 to 10 do;
for i from 1 to 4 do;
o := 1;
c := j*i;
b := 2*c;
M[i, 1..4] := Vector[row]([j, i, c, b]);
Export(L, sprintf("C:/TEMP/%d_%d.xls", j, o), "Sheet0", "A1");
Export(M, sprintf("C:/TEMP/%d_%d.xls", j, o), "Sheet0", "A2");
I didn't indent, but this might be more what you want. (I changed the filenames in a minor way, but they still depend on the variable values.)
I changed lowerbound and upperbound to lowerbd and upperbd. I left most of the layout unchanged, and didn't fix several of the efficiency problems.