473,395 Members | 1,941 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,395 software developers and data experts.

Versioned creating Excel from Windows Application (C#, .NET 3.0)

Hi,

My application should run on Windows XP or Windows Wista. App. also contains

functionality of exporting data into Excel files. I should consider of different

versions of Office instaled on client.

How can I create versioned Excel file? I found lot of web resources including

Microsoft Articles. I wrote code, compile as well and tried to run on XP with

instaled Office 2003. Export method run ok, .xls was generated. Same code, same

program on Vista failed with COMException. I am not surprised, I just want to know

how to fix that :)

Thank you for any answer
Lukas
Nov 7 '08 #1
6 2114
r035198x
13,262 8TB
What libraries did you use for your program?
Nov 7 '08 #2
What libraries did you use for your program?
Project > References > Add > COM >

Microsoft Excel 12.0 Object Library
Nov 7 '08 #3
r035198x
13,262 8TB
12 does not seem to be available for Office 2003. See the table provided in the docs
Nov 7 '08 #4
12 does not seem to be available for Office 2003. See the table provided in the docs
Yes, you right

12.0 - Office 2007
11.0 - Office 2003

So solution is install both Office 2007 and 2003 or both PIA (Primary Interop Assembly) for 2007 and 2003 office on developer machine and provide some application setting where user decides between 2003 and 2007 version. If user choose wrong version, not installed on client machine, app. will obviously throw an Exception.
Nov 7 '08 #5
r035198x
13,262 8TB
Yep, you should then catch that exception and inform the user of their mistake.
Nov 7 '08 #6
Yep, you should then catch that exception and inform the user of their mistake.
So, at first - thank you for your advice. But - I added reference 12.0 to my project, compiled and run well. Then I posted new application publish on our updates web. I run application on Win XP with Office 2003 (publish was created on Win Vista with 2007). Application deployed on Win XP detected new version on interned and downloaded last update. I got error message that there is no Office 2007 instaled on mashine and thus no updates is downloaded.

Question is - How can I get ride of this problem except creating two different applications
Nov 10 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Otie | last post by:
I found the following under the GetObject help notes and in the example for GetObject: "This example uses the GetObject function to get a reference to a specific Microsoft Excel worksheet...
8
by: mytfein | last post by:
Hi Everyone, Background: Another department intends to ftp a .txt file from the mainframe, for me to process. The objective is to write a vb script that would be scheduled to run daily to...
6
by: Matthew Wieder | last post by:
I have the following requirements: Build a stand-alone C# application that asks the user to click in a cell in an Excel spreadsheet, and then displays the address of that cell in the C#...
4
by: Randy | last post by:
Hello, I'm getting an "Access Denied" error when I hit the line of code... Excel.Application oXL = new Excel.Application(); From what I've read, you can get around this by putting the file...
9
by: Gordon | last post by:
Hello again, Sorry to repost this request, but I'm under a bit of pressure to find a quick solution. All I basically want is an automatically updating link (OLE, not DDE) between a control in...
0
by: cappa | last post by:
Hi, i've a problem with a visual basic .net application that use excel. In local everything is fine, but i've to install this application in sometoher computer, and theese pc don't have the same...
7
by: Paul | last post by:
Hi I have created an excel file download feature within a .net application using Microsoft Office XP primary interop assembly for excel. I was just wondering if anyone knows if you can also embed...
1
by: vijay | last post by:
HI all, I have done a C#.net windows application and used Microsoft Excel 11.0 object library.My problem is while creating setup of my project it include Excel.exe which has big size.But...
22
by: robertgregson | last post by:
Using C#, .NET3.5, Visual Studio 2008 and WCF on Windows VISTA SP1, I have written a service, service host (as a C# console application) and a client. The service uses...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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.