在本机调试时生成excel文件没有问题(http://localhost:4354/go),但是发布到网站后(注:仍然是本机做为服务器http://192.168.1.8/go , 192.168.1.8为本机ip)则没有任何反应,请高手指点,急等,如要加分还有
我的代码如下:
Function MakeExcel(ByRef TitleData As String, ByRef Data As System.Data.Odbc.OdbcDataReader, ByRef XCount As Short, ByRef FileName As String, ByRef FilePath As String) As Object
Dim tFileName As Object
Dim i, j As Integer
Dim ex As New Microsoft.Office.Interop.Excel.Application
Dim exwbook As Microsoft.Office.Interop.Excel.Workbook
Dim xlSheet As Microsoft.Office.Interop.Excel.Worksheet
tFileName = FileName + Format(Now, "yyyyMMddhhmmss") + ".xls"
ex = New Microsoft.Office.Interop.Excel.Application
ex.Visible = True
xlSheet = Nothing
exwbook = Nothing
exwbook = ex.Workbooks.Add
xlSheet = exwbook.Worksheets(1)
xlSheet.Cells._Default(1, 1) = "id号"
xlSheet.Cells._Default(1, 2) = "投资人"
xlSheet.Cells._Default(1, 3) = "家庭地址"
xlSheet.Cells._Default(1, 4) = "电话"
xlSheet.Visible = True