Link Search Menu Expand Document

Download and Process file - C#

Spreadsheet SDK sample in C# demonstrating ‘Download and Process file’

using Bytescout.Spreadsheet;
using System.Diagnostics;
using System.IO;

namespace HelloWorld
    class Program
        static void Main(string[] args)
            // Create new Spreadsheet
            Spreadsheet document = new Spreadsheet();

            // Input file url
            var cInputUrl = @"";

            // Get stream from url
            var oStream = GetStreamFromUrl(cInputUrl);

            // load csv file stream

            // Save document

            // Close Spreadsheet

            // open generated XLS document in default program

        /// <summary>
        /// Get stream from Url
        /// </summary>
        private static Stream GetStreamFromUrl(string url)
            byte[] oData = null;

            using (var wc = new System.Net.WebClient())
                oData = wc.DownloadData(url);

            return new MemoryStream(oData);

Download Source Code (.zip)

Return to the previous page Explore Spreadsheet SDK