ByteScout Spreadsheet SDK – C# – Change Cell Width and Height

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – C# – Change Cell Width and Height

ByteScout Spreadsheet SDK – C# – Change Cell Width and Height

Program.cs

using System;
using System.Collections.Generic;
using System.Text;
using Bytescout.Spreadsheet;
using System.Diagnostics;
using System.IO;

namespace Change_cell_width_and_height
{
    class Program
    {
        static void Main(string[] args)
        {
            Spreadsheet document = new Spreadsheet();

            Worksheet worksheet = document.Workbook.Worksheets.Add();

            worksheet.Rows[1].Height = 100;

            // delete output file if exists already
            if (File.Exists("Output.xls")){
                File.Delete("Output.xls");
            }

            document.SaveAs("Output.xls");

            // Close Spreadsheet
            document.Close();

            // open in default spreadsheets viewer/editor
            Process.Start("Output.xls");
        }
    }
}


  Click here to get your Free Trial version of the SDK

prev
next