Formatting Excel sheet in VB.net 2008

crcsupport
crcsupport used Ask the Experts™
on
I used to have the following code in VB 2005, but it does not work in VS 2008:

        Dim ExcelOpt As New ExcelDataOnlyFormatOptions ' this line gives an error in VS 2008

            ExcelOpt.MaintainRelativeObjectPosition = True
            ExcelOpt.ExportObjectFormatting = True
            ExcelOpt.MaintainColumnAlignment = True

Any ideas how to fix it ?

Thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Top Expert 2014
Commented:
Did you install Office Primary Interop Assemblies?

Author

Commented:
I've requested that this question be deleted for the following reason:

i think solve the problem

Author

Commented:
yes , i did

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial