引用ICSharpCode.SharpZipLib.dll 1.编写压缩和解压代码 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using ICShaepCode.SharpZipLib; using ICShaepCode.SharpZipLib.Zip; using ICShaepCode.SharpZip
大家可能觉得上面的代码比较复杂,因为上面对于对打印要求比较高的应用,是十分有效的.如果只是单单对数据进行导出,还可以使用简单的格式,比如使用以下的代码: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim dt As DataTable = CType(Application.Item("MyDataTable"