Update excel files in ip phone using VS.NET
Hi all, currently i am the 1st time doing on a project on ip telephony. By grabbing the web query using microsoft excel 2003 and using microsoft visual studio 2005 to read the code, how am i going to update the data in excel when i only have to initiate the ip telephony? Below is my code. Please do send me ur cmments regarding this problem. A thousand thanks~!
---------------------------------------------------------------------
Imports System.Net
Imports System.io
Imports System.Text
Imports System.Xml
Imports System.Data.OleDb
Imports System.Data
Partial Class leader
Inherits System.Web.UI.Page
Dim cid As String
Dim myDataset As New DataSet
Enum Datatype
Name
Team
Goals
ID
Key
End Enum
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
eplinfo()
End Sub
Private Sub eplinfo()
Dim strConn As New OleDbConnection(MyGlobal.semConnection)
'Dim cid As String = Request.QueryString("cid").ToString
'Dim ext As String = Request.QueryString("ext").ToString
Dim title As String = "Scoring Leaders"
'LogCSV.AddLog("leaders", cid, ext)
Response.ContentType = "text/xml"
Response.Expires = -1
Response.Buffer = True
Response.Write("<CiscoIPPhoneText>")
Response.Write("<Title>" & title.ToString & "</Title>")
Response.Write("<Prompt>" & MyGlobal.PROMPTMSG_IPPS & "</Prompt>")
Dim myDataAdapter As New OleDbDataAdapter("SELECT * FROM [leader$] ", strConn)
myDataAdapter.Fill(myDataset)
Dim name_Row As String
Dim team_Row As String
Dim goal_Row As String = String.Empty
'Dim myRow As DataRow
Response.Write("<Text>")
name_Row = String.Empty
goal_Row = String.Empty
team_Row = String.Empty
Dim i
For i = 1 To myDataset.Tables(0).Rows.Count - 1
name_Row = myDataset.Tables(0).Rows(i).Item(Datatype.Name)
team_Row = myDataset.Tables(0).Rows(i).Item(Datatype.Team)
goal_Row = myDataset.Tables(0).Rows(i).Item(Datatype.Goals)
Response.Write(name_Row & " " & "(" & team_Row & ")" & " " & "Goals Scored: " & goal_Row & Environment.NewLine)
Next
Response.Write("</Text>")
Response.Write("<SoftKeyItem>")
Response.Write("<Name>Back</Name>")
Response.Write("<URL>" & MyGlobal.GetBaseURL(Request.Url.AbsoluteUri) & "eplmenu.aspx" & "</URL>")
Response.Write("<Position>2</Position>")
Response.Write("</SoftKeyItem>")
Response.Write("<SoftKeyItem>")
Response.Write("<Name>Home</Name>")
Response.Write("<URL>SoftKey:Exit</URL>")
Response.Write("<Position>4</Position>")
Response.Write("</SoftKeyItem>")
Response.Write("</CiscoIPPhoneText>")
End Sub
End Class
---------------------------------------------------------------------
Any help given will be appreciated.
Thanks alot :)
|