The short answer: we don't need a separate term for "foregone cost", because opportunity cost of doing something = highest (forgone benefit - foregone cost).
I'd like to stress two points about opportunity cost.
First, it doesn't make much sense to say "the opportunity cost in this example"; you need to specify the opportunity cost of doing what? We always explicitly state the opportunity cost of doing something, or opportunity cost of choosing something. In your investment vs bank savings example, the opportunity cost of using the money to invest is \$40, and the opportunity cost of depositing the money in the bank is \$60 (assuming investing and saving are the top 2 most productive use of your money, and assuming no ex-ante risk in investing). In your spreadsheet example, suppose you only have two options to spend 1.5 hours: A - you can spend 1 hour to make the spreadsheet, and use the rest 0.5 hour to do whatever is most productive, or B - you can spend 1.5 hours to program in VBA. The opportunity cost of choosing A is the net benefit of doing B, and the opportunity cost of choosing B is the net benefit of doing A.
Second, I highlighted the net benefit at the end of the previous paragraph. Opportunity cost of doing something is the highest foregone net benefit of the alternatives. Here the foregone net benefit is defined as the (foregone benefit - foregone cost). Let me go back to your spreadsheet example. Suppose finishing the spreadsheet gives you \$50 equivalent of utility, regardless of how you make the spreadsheet. However, let's say, manually making the spreadsheet bores you, incurring \$30 equivalent disutility, and making the spreadsheet via VBA bores your less, incurring \$20 disutility. I also assume the most productive use of your time in that 1.5 hours is taking some rest, which gives you \$40 per hour utility. Now here is the net benefit of option A: \$50 (benefit for finishing the spreadsheet) - \$30 (cost for making the spreadsheet manually) + \$20 (benefit for 0.5 hour rest) = \$40. And the net benefit of option B: \$50 (benefit for finishing the spreadsheet) - \$20 (cost for making the spreadsheet via VBA) = \$30. Therefore the opportunity cost of choosing A is \$30, and the opportunity cost of choosing B is \$40. We don't need a term for "foregone cost".