Hi everyone,
I hope you could help me with my problem
I am a fresh graduate and I am working now as a developer in a good company
By the way, I am not the one who developed this tool, it's the previous programmer and they gave the project to me to update it
however, when I try to run the application in my local computer I am getting this error:
Argument not specified for parameter 'XLSFile' of 'Public Sub New(XMLFile As String, XLSFile As String)'.
The error points to the code below in bold letter:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Zym.ConnectionString = Web.Configuration.WebConfigurationManager.ConnectionStrings("cnworkload").ConnectionString
'Dim cn As System.Data.SqlClient.SqlConnection = New System.Data.SqlClient.SqlConnection(Zym.ConnectionString)
'Dim DA As New System.Data.SqlClient.SqlDataAdapter("SELECT * FROM SUMMARY_WORKLOAD", cn)
'Dim DS As System.Data.DataSet = New System.Data.DataSet
Try
[B]excel = New zymClass.myCustomClass.Excel(Server.MapPath(Request.ApplicationPath) & "\Export\ExportPivot.xlsx") [/B]
excel.ConnectionString=Web.Configuration.WebConfigurationManager.ConnectionStrings("cnworkload").ConnectionString
excel.STRSQL = "SELECT * FROM SUMMARY_WORKLOAD"
excel.Connect()
'cn.Open()
'DA.Fill(DS)
'excel.ExportRawData(DS)
excel.Sheetname = "RAW DATA"
excel.SetPageField("CORPORATE")
excel.SetRowField("BUSGROUP", "TEAM")
excel.SetRowName("Business Group or Corporate", "Team")
excel.SetRowSummary(True, False)
excel.SetRowGrandtotal(False)
excel.SetColumnField("YEAR", "MONTH")
excel.SetColumnName("Year", "Month")
excel.SetColumnSummary(False, False)
excel.SetColumnGrandtotal(False)
excel.SetDataField("Hours")
excel.SetDataName("Count of Hours")
excel.SetDataFormat("0")
excel.SetDataConsolidation(Microsoft.Office.Interop.Excel.XlConsolidationFunction.xlCount)
excel.ExportPivot("OLEDB;Provider=SQLOLEDB;", excel.STRSQL, "Workload Data")
Catch ex As Exception
End Try
Zym.ZipFile(" /C zip """ & HttpContext.Current.Server.MapPath("~/export/exportpivot.zip") & """ """ & HttpContext.Current.Server.MapPath("~/export/exportpivot.xlsx") & """", HttpContext.Current.Server.MapPath("~/export"))
Response.Redirect("FILE.ASPX")
End Sub
I really hope someone can help me, I already said to myself that crying is not the key to solve this ....
Thank you very much in advance and tell me if you need to see the whole .aspx and .vb code so that I can provide you.
.