cancel
Showing results for 
Search instead for 
Did you mean: 

Question about creating Web service for Xcelsius

Former Member
0 Kudos

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!!!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Jeremy,

This might get you closer (VB.net):

Regards,

Matt

Former Member
0 Kudos

Matt, this is perfect. Thanks for the info. I don't know why I couldn't find that when I was looking for answers. Maybe I was searching the wrong forum.