ByteScout Spreadsheet SDK - C# - Change Column Width and Row Height - ByteScout

ByteScout Spreadsheet SDK – C# – Change Column Width and Row Height

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

How to change column width and row height in C# using ByteScout Spreadsheet SDK

How to change column width and row height in C#

The sample source code below will teach you how to change column width and row height in C#. What is ByteScout Spreadsheet SDK? It is the SDK component for writing, reading, modifying and calculating Excel and CSV spreadsheets. Can calculate and reculculate formulas with Excel installed. You may import or export data to and from CSV, XML, JSON. Supports export to databases, arrays, streams. It can help you to change column width and row height in your C# application.

You will save a lot of time on writing and testing code as you may just take the C# code from ByteScout Spreadsheet SDK for change column width and row height below and use it in your application. In order to implement the functionality, you should copy and paste this code for C# below into your code editor with your app, compile and run your application. Detailed tutorials and documentation are available along with installed ByteScout Spreadsheet SDK if you’d like to dive deeper into the topic and the details of the API.

Free trial version of ByteScout Spreadsheet SDK is available on our website. Documentation and source code samples are included.

Try ByteScout Spreadsheet SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

Program.cs
      
using System; using System.Collections.Generic; using System.Text; using Bytescout.Spreadsheet; using System.Diagnostics; using System.IO; namespace Sample { class Program { static void Main(string[] args) { // Create new XLS document Spreadsheet document = new Spreadsheet(); // Create new worksheet Worksheet worksheet = document.Workbook.Worksheets.Add(); // Set column width worksheet.Columns[1].Width = 300; // Set column height worksheet.Rows[1].Height = 100; // 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 in default spreadsheets viewer/editor Process.Start("Output.xls"); } } }

Try ByteScout Spreadsheet SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

VIDEO

ON-PREMISE VERSION INFORMATION

Get 60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Get ByteScout Spreadsheet SDK Free Training

WEB API

Get Your Free API Key

Explore Web API Documentation

Tutorials:

prev
next