Code: Private Sub exportarBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exportarBtn.Click
Dim xls As New ExcelDocument
Dim xlsWorksheet As New ExcelWorksheet("CLIENTES")
xls.easy_addWorksheet(xlsWorksheet)
xlsWorksheet.easy_insertDataSet(GetClientesDataset, 0, 0, True)
Try xls.easy_WriteXLSFile(Server.MapPath("files/clientesLoja.xls")) Catch exc As Exception exportMsg.Text = exc.Message End Try
xls.Dispose()
End Sub |