Go Back  Xtreme Visual Basic Talk > Visual Basic .NET (2002/2003/2005/2008, including Express editions) > .NET Office Automation > Incompatible Excel versions?


Reply
 
Thread Tools Display Modes
  #1  
Old 05-28-2010, 11:25 AM
Tom Menacher Tom Menacher is offline
Newcomer
 
Join Date: Nov 2007
Posts: 1
Default Incompatible Excel versions?


I wrote a windows application in VB Net to read some data and create an Excel spreadsheet. It references the Excel 12.0 object library and adds the appropriate office.interop.excel.dll to the msi file in my installer project. (.NET 2.0 framework).

When I install on a machine with Office 2007, the program runs without a problem.

When I install on a machine with Office 2003, the program runs to the point where I attempt to open the Excel application. I get an error message: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

Is there a solution to this incompatibility? I suppose I could reference an older Excel object library, and save my file as XLS instead of XLSX.
Reply With Quote
  #2  
Old 05-28-2010, 12:36 PM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

Hi Tom,

Welcome to the forum.

Quote:
Originally Posted by Tom Menacher View Post
Is there a solution to this incompatibility? I suppose I could reference an older Excel object library, and save my file as XLS instead of XLSX.
Yes, exactly.

If you can't get access to an older Excel 2003 object model, then you could download and install the Excel 2003 PIA Redistributable Package and then reference that:

(1) Excel 2003 PIA Redistributable Package (instructions)
(2) Excel 2003 PIA Redistributable Package (download)

Hope this helps!
Mike
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
Reply

Tags
excel 2003, excel 2007


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->