O
OWC
I have an ASP.Net applicatation that coded in VB.Net and uses the OWC11
spreadsheet component on the client and the server.
It all works fine on my development machine.
However, when I move it to another web server, I'm getting a few errors
dealing with the OWC on the server. The problems all revolve around the use
of Long datatypes. The problems occur on lines like:
oSS.Sheets(i).delete() ' Where the variable i is a Long
rangeUpperLeft.Offset(dataOffsetRow, dataOffsetColumn).Address ' Where
dataOffsetRow is a Long
These statements get the error message:
Run-time exception thrown : System.Runtime.InteropServices.COMException -
Bad variable type.
If I redefine the variables from Long to Integer, it works OK on both
servers. As far as I can tell, both servers are running the same version of
..Net framework, OWC11 and the OWC PIA's.
Using an Integer to index the Sheets collection is no problem (although its
still a curiosity why it would operate differently). However, I really need
to use a long for the second case since a worksheet can have more rows than
can be counted in an Integer.
TIA,
josh
spreadsheet component on the client and the server.
It all works fine on my development machine.
However, when I move it to another web server, I'm getting a few errors
dealing with the OWC on the server. The problems all revolve around the use
of Long datatypes. The problems occur on lines like:
oSS.Sheets(i).delete() ' Where the variable i is a Long
rangeUpperLeft.Offset(dataOffsetRow, dataOffsetColumn).Address ' Where
dataOffsetRow is a Long
These statements get the error message:
Run-time exception thrown : System.Runtime.InteropServices.COMException -
Bad variable type.
If I redefine the variables from Long to Integer, it works OK on both
servers. As far as I can tell, both servers are running the same version of
..Net framework, OWC11 and the OWC PIA's.
Using an Integer to index the Sheets collection is no problem (although its
still a curiosity why it would operate differently). However, I really need
to use a long for the second case since a worksheet can have more rows than
can be counted in an Integer.
TIA,
josh