T
tchaar
Hello,
I'm trying to create a web service that accesses an excel sheet saved
in xml using the Office Web Components available from Microsoft,
specifically OWC11. Everytime I set the XMLURL in the SpreadSheetClass
object, it bombs out on me telling me there is a COMEXCEPTION...
System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has
been returned from a call to a COM component.
at Microsoft.Office.Interop.Owc11.SpreadsheetClass.set_XMLURL(String
URL)
at tools.pricingSheet.getDefaultValues(String paramCountry, String
paramClientCateogory) in
c:\Inetpub\wwwroot\pricingSheetWS\App_Code\tools\pricingSheet.cs:line
35
at pricingSheetWS.getDefaultValues(String paramCountry, String
paramClientCategory) in
c:\Inetpub\wwwroot\pricingSheetWS\App_Code\pricingSheetWS.cs:line 23
Here is the code...
public static XmlDocument getDefaultValues(string paramCountry,string
paramClientCateogory)
{
SpreadsheetClass sp = new SpreadsheetClass();
String strCountry = paramCountry;
Worksheet wrksheet = null;
string strValue = null;
XmlDocument xmldoc = null;
sp.XMLURL = "pricingsheet/" + strCountry +
"_pricingsheet.xml";
wrksheet = (Worksheet)sp.Worksheets["Summary"];
wrksheet.Cells["B", "3"] = paramClientCateogory;
strValue = (string)wrksheet.Cells["B", "11"];
return xmldoc;
}
Thanks for all your help. I appreciate it.
I'm trying to create a web service that accesses an excel sheet saved
in xml using the Office Web Components available from Microsoft,
specifically OWC11. Everytime I set the XMLURL in the SpreadSheetClass
object, it bombs out on me telling me there is a COMEXCEPTION...
System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has
been returned from a call to a COM component.
at Microsoft.Office.Interop.Owc11.SpreadsheetClass.set_XMLURL(String
URL)
at tools.pricingSheet.getDefaultValues(String paramCountry, String
paramClientCateogory) in
c:\Inetpub\wwwroot\pricingSheetWS\App_Code\tools\pricingSheet.cs:line
35
at pricingSheetWS.getDefaultValues(String paramCountry, String
paramClientCategory) in
c:\Inetpub\wwwroot\pricingSheetWS\App_Code\pricingSheetWS.cs:line 23
Here is the code...
public static XmlDocument getDefaultValues(string paramCountry,string
paramClientCateogory)
{
SpreadsheetClass sp = new SpreadsheetClass();
String strCountry = paramCountry;
Worksheet wrksheet = null;
string strValue = null;
XmlDocument xmldoc = null;
sp.XMLURL = "pricingsheet/" + strCountry +
"_pricingsheet.xml";
wrksheet = (Worksheet)sp.Worksheets["Summary"];
wrksheet.Cells["B", "3"] = paramClientCateogory;
strValue = (string)wrksheet.Cells["B", "11"];
return xmldoc;
}
Thanks for all your help. I appreciate it.