Skip to Content
author's profile photo Former Member
Former Member

Question about creating Web service for Xcelsius

Has anyone successfully written a Web service in .Net C# that Xcelsius can use? I was just trying to create something simple and it will not work. I get data in my Xcelsius report, but it is all lumped into one 'cell' and the XML tags are still in there. If anyone has some sample code that does work it would be much appreciated.

Here is what I have:

public string getTableInfo()

{

SqlDataAdapter dbadapter = null;

DataSet returnDS = new DataSet();

using (SqlConnection dbconn = new SqlConnection(

"Server=SERVER;"

+ "Database=DB_NAME;"

+ "User ID=ACCOUNT;"

+ "Password=PW123;"

+ "Trusted_Connection=False;"))

{

SqlCommand cmd = new SqlCommand();

string sqlQuery = "select FIELD1, FIELD2 from TABLE";

cmd.CommandText = sqlQuery;

cmd.Connection = dbconn;

dbadapter = new SqlDataAdapter(cmd);

dbadapter.Fill(returnDS);

}

return returnDS.GetXml();

}

thanks!!!

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2009 at 09:16 PM

    Hi Jeremy

    Not sure if this will help but have you looked at getting an XML map to consume your data in Excel?

    Regards

    Charles

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.