Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Error while creating excel sheet in office 2007 using mhtml

Hello friends,

I am facing problem while creating excel sheet in office 2007 using mhtml.

I've written an office interface with VS2003. This interface works fine with
all office version except office 2007. It throws folllowing the expection

at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
msgData)

at Microsoft.Office.Interop.Excel.Shape.get_Hyperlink () at

Call to delete function throws this exception. (Following is the code)

Excel.Shape newShp = xlSheet.Shapes.Item(xlSheet.Shapes.Count);

address = address.Replace(cb.objectId,propBean.objectId);

newShp.Hyperlink.Delete();

this hyperlink property has value as "<error: an exeception of type:
{System.Runtime.Intropservices.COMException} occured"

This problem is because shape does not have a hyperlink value. I tried to
figure out exact problem. Here is what exactly happening.

In my excel sheet, I have first column which has image added and having
hyperlink on that. User clicks on that to open that particular row. When i
create Excel sheet, my office interface downloads all values from server
side in *.mhtml file (single file web page) and opens it in excel. All
columns and images getting exported/displayed in excel 2003 properly but same
doesn't work with excel 2007. The images having hyperlink is not getting
created in excel 2007 and that's the reason why i am getting that exception.

If you open this mhtml file in wordpad it has same text, still this file
doesnt open properly in excel 2007. I have copied some part of that mhtml
file. See if you can get any info where i am going wrong.

<tr ALIGN=3DCENTER VALIGN=3DTOP

=09=09=09=09<th BGCOLOR=3D#C0C0C0 ID=3D"H0H0"Home</th

=09=09=09=09<th BGCOLOR=3D#C0C0C0 ID=3D"H1H1"Name</th

=09=09=09=09<th WIDTH=3D32 BGCOLOR=3D#C0C0C0 ID=3D"H0H0"<v:shape style=3D'=

margin-left:2;margin-top:2;width:12pt;height:12pt'<v:imagedata src=3D"TcR-=

1.0.1746511703117053_files\Attachment.gif" o:title=3D""/<x:ClientData Obje=

ctType=3D"Pict"/ </v:shape</th

=09=09=09=09<th WIDTH=3D32 BGCOLOR=3D#C0C0C0 ID=3D"H0H0"<v:shape style=3D'=

margin-left:2;margin-top:2;width:12pt;height:12pt'<v:imagedata src=3D"TcR-=

1.0.1746511703117053_files\Trace Link.gif" o:title=3D""/<x:ClientData Obje=

ctType=3D"Pict"/ </v:shape</th

=09=09=09=09<th BGCOLOR=3D#C0C0C0 ID=3D"H1H1"Number</th

=09=09=09=09<th BGCOLOR=3D#C0C0C0 ID=3D"H1H0"ROIN</th

=09=09=09=09<th BGCOLOR=3D#C0C0C0 ID=3D"H1H0"Type Name</th

=09=09=09=09<th BGCOLOR=3D#C0C0C0 ID=3D"H1H0"Create User</th

=09=09=09=09<th BGCOLOR=3D#C0C0C0 ID=3D"H1H0"Create Time</th

=09=09=09</tr



------=_NextPart_01C7460D.387A5950

Content-Location: file:///C:/D4C81145/withImage_files/image007.png

Content-Transfer-Encoding: base64

Content-Type: image/png




--------------------------------------------------------------------------------
sharad

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
compile error in hidden module: autoexecnew - Office 2007 (Excel) Adam Excel Discussion (Misc queries) 1 June 12th 09 05:07 PM
Updated to Office 2007 - Saving Excel file error Duane Excel Discussion (Misc queries) 1 April 14th 08 09:07 AM
Error message when copying Excel Pie Chart to Word (in Office 2007 Market1 Charts and Charting in Excel 0 December 12th 07 05:01 PM
Excel sheet send as emial body - office 2007 csi.sec Excel Discussion (Misc queries) 1 February 5th 07 07:40 AM
comile error for sheet in office 2000 but not office 2003?? Bob Aylward[_2_] Excel Programming 1 December 13th 05 07:36 PM


All times are GMT +1. The time now is 07:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"