Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with ExportXML method in VS 2008

14 views
Skip to first unread message

houston

unread,
Apr 19, 2011, 5:09:49 AM4/19/11
to
hi everyone,

I 'm using ExportXML in my workbook assembly vsto (a managed code
extension develop using Visual Studio 2008, Excel Workbook project)
and it does not work. It always return an empty string.


My current version in Visual studio 20005 is working; I just want to
migrate over to Visual Studio 2008, which I have successfully done so.
Build and publish was successful. Installation of the assembly using
_AssemblyLocation and _AssemblyName is successful during workbook
startup.


It's only when it comes to executing the ExportXML code when i get the
problem as mentioned above. Code snippet:


Dim

strChanged As New String("") Dim xr As Excel.XlXmlExportResult
xr = ThisApplication.ActiveWorkbook.XmlMaps(

"Changed").ExportXml(strChanged) If xr =
Excel.XlXmlExportResult.xlXmlExportSuccess Then
MsgBox(

"Export 3.0 Seems to be Success") ElseIf xr =
Excel.XlXmlExportResult.xlXmlExportValidationFailed Then
MsgBox(

"Export failed validation") End If
MsgBox(strChanged.Length())

strChanged, which is passed ByRef to ExportXML will always be zero
length !!


The same set of code works in Visual Studio 2005.


Any help or diagnosis is appreciated. Thanks.


regards
Houston Shum

0 new messages