Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 11th, 2008, 01:27 PM
Authorized User
 
Join Date: Jul 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default C# Excel 2000 and Excel 2003

Hello all, hopefully you can help.

I have a C# app that creates Excel reports. I have Excel 2000 on my pc and have a reference to Microsoft Excel 9.0 object library.

This works for other users with pc's having Excel 2000 installed.

Now I have a set of users with Excel 2003 and my application gets an activex error cannot create object. I can't install Excel 2003 on my pc to get the Primary Interop Assembly.
Code:
Excel.Application objExcel = new Excel.Application();  //Error users with 2003
How can I have my application work for users of both Excel versions?

Thanks
 
Old December 12th, 2008, 11:23 AM
Authorized User
 
Join Date: Jul 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well it looks like I have to use late binding to get around the version issue.

I was able to get it working using late binding, but only after I installed the office 2003 pia's on the user's machine.
 
Old March 4th, 2010, 05:10 AM
Registered User
 
Join Date: Mar 2010
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

there is a more simpler solution, forget about Excel Automation, and start using some real Excel C# component.

Forget about versioning issues, performance and security problems, especially in Excel ASP.NET apps.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2000 upgrade to Excel 2007 poyserr Excel VBA 0 October 27th, 2008 10:51 AM
Problem in opening excel file in MS Excel 2000 kallol Visual C++ 0 November 16th, 2007 05:48 AM
Excel Macro works in 2000 but not 2003 BUCKLSU Excel VBA 1 June 5th, 2007 01:40 PM
Excel 2000 vs Excel 2002 Macro Issue williadn Excel VBA 1 July 14th, 2005 09:09 AM
Excel in win 2000 to excel winxp (excel 2002) Max Excel VBA 3 August 28th, 2003 04:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.