Cannot set Spreadsheet.XMLData in WinForms

A

andy moo

Hello

I'm using the OWC11 Spreadsheet component in a WinForm application (C#,
VS.2005).
When I try to set the property XMLDATA i get an COM-HRESULT error.

Example:
string strXML = this.axSpreadsheet1.XMLData; // that works!
this.axSpreadsheet1.XMLData = strXML // this fails...


Does anyone has an idea want I'm missing??

Cheers,
Andy
 
A

Alvin Bruney [MVP]

I assume that when you unload the XML, you aren't turning around and loading
it back because that would be a bug in the OWC. I assume you are trying to
load XML and it's failing. Is this a correct assumption? If it is, the XML
must be spreadsheet XML. If it is not, can you paste the COM error code
here?

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
 
A

andy moo

Hi Alvin

I just tried the two lines above (getting/ setting) and it didn't work.
Eventually I removed the control from the WinForm and dragged it (from
the Toolbox) again onto the WinForm, and now everything works...

But anyhow, thanks for your response! ;)


I assume that when you unload the XML, you aren't turning around and loading
it back because that would be a bug in the OWC. I assume you are trying to
load XML and it's failing. Is this a correct assumption? If it is, the XML
must be spreadsheet XML. If it is not, can you paste the COM error code
here?

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


andy moo said:
Hello

I'm using the OWC11 Spreadsheet component in a WinForm application (C#,
VS.2005).
When I try to set the property XMLDATA i get an COM-HRESULT error.

Example:
string strXML = this.axSpreadsheet1.XMLData; // that works!
this.axSpreadsheet1.XMLData = strXML // this fails...


Does anyone has an idea want I'm missing??

Cheers,
Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top