473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

C# MS Office Version problem

Hi,

In our C# windows form project, we have referenced MS Excel 10.0 in our
project.
However, we have several different versions of MS Excel in our client sites.
How do we fix this problem without changing client's Excel?
Thanks for help.

Jason
Aug 8 '06 #1
3 1996
This may be over-engineering it, but maybe you could develop a generic
interface for your needs and then create a DLL for each version of Excel
that you need to support. You could then load the relevant DLL using
reflection in your application. Not sure how you'd determine which version
of the DLL to use, if you could do it programatically or need to read it
from application configuration file. If there's no clear way to determine
which version to use, on start up I guess you could increment through the
DLL's trying each in time until you found one that worked. You may only
need to do this once as you could then update the config file with which
version to use. If you needed to support a new version you could then just
supply a new DLL to the relevant client site.
"Jason Huang" <Ja************@hotmail.comwrote in message
news:eF**************@TK2MSFTNGP04.phx.gbl...
Hi,

In our C# windows form project, we have referenced MS Excel 10.0 in our
project.
However, we have several different versions of MS Excel in our client
sites.
How do we fix this problem without changing client's Excel?
Thanks for help.

Jason

Aug 8 '06 #2
cp
You could reference the 'lowest' level of Excel (you might get on
client machines) e.g. version 9.0.

cp

Jason Huang wrote:
Hi,

In our C# windows form project, we have referenced MS Excel 10.0 in our
project.
However, we have several different versions of MS Excel in our client sites.
How do we fix this problem without changing client's Excel?
Thanks for help.

Jason
Aug 8 '06 #3
Thanks!
But I have no idea how to code DLL in my project!

"Paul" <no****@noone.com¼¶¼g©ó¶l¥ó·s»D:e6**************@T K2MSFTNGP04.phx.gbl...
This may be over-engineering it, but maybe you could develop a generic
interface for your needs and then create a DLL for each version of Excel
that you need to support. You could then load the relevant DLL using
reflection in your application. Not sure how you'd determine which
version of the DLL to use, if you could do it programatically or need to
read it from application configuration file. If there's no clear way to
determine which version to use, on start up I guess you could increment
through the DLL's trying each in time until you found one that worked.
You may only need to do this once as you could then update the config file
with which version to use. If you needed to support a new version you
could then just supply a new DLL to the relevant client site.
"Jason Huang" <Ja************@hotmail.comwrote in message
news:eF**************@TK2MSFTNGP04.phx.gbl...
>Hi,

In our C# windows form project, we have referenced MS Excel 10.0 in our
project.
However, we have several different versions of MS Excel in our client
sites.
How do we fix this problem without changing client's Excel?
Thanks for help.

Jason


Aug 9 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: dkomo | last post by:
I wrote a VB 6.0 program to create an Access database file and fill it with data. I used the following DAO statement: Set db_AllEquity = ws.CreateDatabase(Database_Name, dbLangGeneral,...
3
by: Chuck Arney | last post by:
After installing Office 2003 PRO and attempting to run SETUP to install the Visual Studio Tools for Office version 2003, I get the error message "Your computer must have Microsoft Office...
1
by: zfeld | last post by:
1. Where do I get the Office 2003 PIAs? On the MSDN download site there are only downloads for XP office PIAs. Do they automatically get installed to the GAC with the installation of office 2003? ...
4
by: Hawkmoth | last post by:
Hi I hope you can help with what seems to be a simple problem that is driving me nuts! I am developing a C# application using Visual studio 2003 and I need to use Office 2003 automation. In...
2
by: Stefan Hirtbach | last post by:
Hi, I have to create and edit Excel and Word files with an server-side applikation. One problem is that on this server no Office will be accessible, so that I can't use normal automatisation. The...
6
by: Marco Singer | last post by:
Hi all, is there any way to create a VB.NET application that automates MS Word and Excel and works with all Office versions from 97 and newer? I currently have Office XP installed. Ok, I could...
2
by: William LaMartin | last post by:
I have created a program that allows for the automation of things in Word documents, like changing the values of DocVariables and the links to Excel Sheets. I did it using interoperoperatability,...
5
by: John | last post by:
Hi I need to call methods from office apps from my vb.net app. Some of my clients are still on office 2000 so to maintain compatibility I can not use office 2003 PIA. Can I avoid the whole PIA...
5
by: Michael Russell | last post by:
Hi all, Using C#, I've created a simple wrapper class for using Excel. I have Office Pro 2003 installed on my devel machine. The wrapper class works great, reading and writing to/from Excel. ...
11
by: Don | last post by:
QUESTIONS: 1. Has anyone figured out how to successfully install the Office 97 Pro Service Release 2 patch in Vista? 2. Has anyone successfully installed an Office 97 Pro CD (SR2 version) in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.