Please, read my comment to the question. A
from
variable name is wrong. This is a reserved word. Please, see:
C# Keywords[
^]
I'd suggest to change the name of variable to
fromrange
- for example.
A "
to
" range doesn't need to be defined the same way as "
fromrange
" (doesn't have to be same size). It is sufficient to define it as a sigle cell:
Excel.Range torange = destworkSheet.Range["B1"];