Program.cs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | using System; using System.Collections.Generic; using System.Text; using Bytescout.Spreadsheet; using System.IO; using System.Diagnostics; namespace HelloWorld { class Program { static void Main( string [] args) { // Create new Spreadsheet Spreadsheet document = new Spreadsheet(); // Add new worksheet Worksheet worksheet = document.Workbook.Worksheets.Add( "HelloWorld" ); // Set cell value worksheet.Cell(0, 0).Value = "Hello, World!" ; // delete output file if exists already if (File.Exists( "Output.xls" )){ File.Delete( "Output.xls" ); } // Save document document.SaveAs( "Output.xls" ); // Close Spreadsheet document.Close(); // open generated XLS document in default program Process.Start( "Output.xls" ); } } } |
Click here to get your Free Trial version of the SDK
also available as: