Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / June 2005

Tip: Looking for answers? Try searching our database.

Excel Interop Requires Different Declarations on XP and W2K

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Marc Rivait - 01 Jun 2005 14:02 GMT
I have been creating and asp.net application to build and XL 2003 work
sheet.  The declarations my app needs are different on XP vs. W2K Server.
Here they are:

'This syntax works with WindowsXPImports Microsoft.Office.Interop

Imports Microsoft.Office.Interop.Excel

Imports Microsoft.Office.Interop.Excel.Constants

Imports Microsoft.Office.Interop.Excel.XlPivotTableSourceType

Imports Microsoft.Office.Interop.Excel.XlPivotFieldOrientation

Imports Microsoft.Office.Interop.Excel.XlUnderlineStyle

Imports Microsoft.Office.Interop.Excel.XlPivotFormatType

Imports Microsoft.Office.Interop.Excel.XlPTSelectionMode

'This syntax works with W2K server

'Imports Microsoft.Office

'Imports Excel.Constants

'Imports Excel.XlPivotTableSourceType

'Imports Excel.XlPivotFieldOrientation

'Imports Excel.XlUnderlineStyle

'Imports Excel.XlPivotFormatType

'Imports Excel.XlPTSelectionMode

'Imports Microsoft.ApplicationBlocks.Data
Marc Rivait - 01 Jun 2005 14:07 GMT
I have been creating and asp.net application to build and XL 2003 work
sheet.  The declarations my app needs are different on XP vs. W2K Server.

Here they are:

'This syntax works with WindowsXPImports Microsoft.Office.Interop
 Imports Microsoft.Office.Interop.Excel
 Imports Microsoft.Office.Interop.Excel.Constants
 Imports Microsoft.Office.Interop.Excel.XlPivotTableSourceType
 Imports Microsoft.Office.Interop.Excel.XlPivotFieldOrientation
 Imports Microsoft.Office.Interop.Excel.XlUnderlineStyle
 Imports Microsoft.Office.Interop.Excel.XlPivotFormatType
 Imports Microsoft.Office.Interop.Excel.XlPTSelectionMode

'This syntax works with W2K server
Imports Microsoft.Office
Imports Excel.Constants
Imports Excel.XlPivotTableSourceType
Imports Excel.XlPivotFieldOrientation
Imports Excel.XlUnderlineStyle
Imports Excel.XlPivotFormatType
Imports Excel.XlPTSelectionMode
Imports Microsoft.ApplicationBlocks.Data

I do not know if anyone as come across this problem, but I cannot find a
reason for requiring different declarations.  The object references have
been made in the same way.

Thanks for any help.
Tyler - 01 Jun 2005 16:57 GMT
You don't have the Office XP PIAs installed on the XP machine and not on the
W2K server machine, do you?

http://www.microsoft.com/downloads/details.aspx?FamilyId=C41BD61E-3060-4F71-A6B4
-01FEBA508E52&displaylang=en


>I have been creating and asp.net application to build and XL 2003 work
>sheet.  The declarations my app needs are different on XP vs. W2K Server.
[quoted text clipped - 25 lines]
>
> Thanks for any help.
Marc Rivait - 01 Jun 2005 18:28 GMT
I have never explicity installed the Office XP PIA's on either machine and
because I am running Office 2003.  Are these required?

> You don't have the Office XP PIAs installed on the XP machine and not on
> the W2K server machine, do you?
[quoted text clipped - 30 lines]
>>
>> Thanks for any help.
Tyler - 02 Jun 2005 02:06 GMT
They're not required, but from what I've read, they can assist with Office
development in .NET (though I've yet to find good use for them personally
... I've only had them create problems for me).

I do know that, on machines in my office that do not have the Office XP PIAs
installed, the Microsoft.Office.Interop.* assemblies do not exist in the GAC
whereas on my machine, where I have installed them (I also have Office 2K3),
they do exist in the GAC.

Tyler
Marc Rivait - 05 Jun 2005 12:22 GMT
I have this a try, and you were on the right track.  I found some interops
for office 2003 which did the trick.  Here is a link to where I found them.

'Office 2003 Update: Redistributable Primary Interop Assemblies
'http://www.microsoft.com/downloads/details.aspx?familyid=3c9a983a-ac14-4125-8ba0
-d36d67e0f4ad&displaylang=en


Thanks,

Marc.

> They're not required, but from what I've read, they can assist with Office
> development in .NET (though I've yet to find good use for them personally
[quoted text clipped - 6 lines]
>
> Tyler

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.