excel report generation

  • Thread starter Thread starter kalaivanan
  • Start date Start date
K

kalaivanan

Hi,
dis is kalai and i am new to dis group.
i am generating excel report in c# .net using microsoft excel 10.0
object library. the micrsoft office version which i am using is 2002. I
can very well generate the excel report.
I have implemented the same application in a system with office 2000. I
am not able to generate the report.
The error i am getting is:

Object reference not set to an instance of an object.

what could be the solution for this problem other than installing 2002
version of microsoft office?
 
office 2002 = office 10.0

Interfaces are not forwards compatible - i.e. office 2000 does not support
the office 2002 object library, since it didn't exist at the time of
writing. Conversely, however, office 2002 will support the 2000 interfaces
(although you may need to watch out for subtle runtime changes in what
methods do).

You must build against the lowest-level object library that you need to
support; if you need to support 2000, then build against the 2000 object
library. Or if you need 2002 features, then all clients must have 2002 to
use that functionality.

In some situations it is possible to support whateve is installed on a
best0endeavours basis (i.e. some functions may be unavailable), but this
takes a lot more code and introduces complexity and additional testing.

Marc
 
Why not export the data as a CSV file? From what I can see, CSV files
are supported in even the old versions of excel, plus, you have the
advantage of importing the file into other databases if needed.
 
Back
Top