Saturday 6 July 2013

Open Excel workbooks in VB.NET Solutions








.NET WebBrowser Control

 

The following code is used to achieve the above:

 

Zip and Extract files in .NET

You must reference the assembly in your project-- System.IO.Compression.FileSystem

using System;
using System.IO;
using System.IO.Compression;

namespace ConsoleApplication
{
    class Program
    {
        static void Main(string[] args)
        {
            string startPath = @"c:\example\start";
            string zipPath = @"c:\example\result.zip";
            string extractPath = @"c:\example\extract";

            ZipFile.CreateFromDirectory(startPath, zipPath);

            ZipFile.ExtractToDirectory(zipPath, extractPath);
        }
    }
}