ByteScout Spreadsheet SDK - C# - Line Styles In Cells - ByteScout

ByteScout Spreadsheet SDK – C# – Line Styles In Cells

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – C# – Line Styles In Cells

line styles in cells in C# and ByteScout Spreadsheet SDK

Make line styles in cells in C#

:

Tutorial on how to do line styles in cells in C#

The documentation is designed to help you to implement the features on your side. Line styles in cells in C# can be implemented with ByteScout Spreadsheet SDK. ByteScout Spreadsheet SDK 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.

This rich sample source code in C# for ByteScout Spreadsheet SDK includes the number of functions and options you should do calling the API to implement line styles in cells. In order to implement this functionality, you should copy and paste code below into your app using code editor. Then compile and run your application. C# application implementation typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.

Visit our website provides for free trial version of ByteScout Spreadsheet SDK. Free trial includes lots of source code samples to help you with your C# project.

Try ByteScout Spreadsheet SDK today: Get 60 Day Free Trial or sign up for Web API

Program.cs
      
using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; using Bytescout.Spreadsheet; using Bytescout.Spreadsheet.Constants; using System.IO; namespace HelloWorld { class Program { static void Main(string[] args) { // Create new Spreadsheet Spreadsheet document = new Spreadsheet(); // Get worksheet by name Worksheet worksheet = document.Workbook.Worksheets.Add(); // Number of cell in the first column int cellRow = 0; // Apply all line styles foreach (LineStyle lineStyle in Enum.GetValues(typeof(LineStyle))) { // Set current cell Cell currentCell = worksheet.Cell(cellRow, 0); // Set border styles currentCell.RightBorderStyle =lineStyle; currentCell.LeftBorderStyle = lineStyle; currentCell.TopBorderStyle = lineStyle; currentCell.BottomBorderStyle = lineStyle; // Print style name currentCell.Value = lineStyle.ToString(); // Choose next row cellRow += 2; } // delete output file if exists already if (File.Exists("LineTypes.xls")){ File.Delete("LineTypes.xls"); } // Save document document.SaveAs("LineTypes.xls"); // Close document document.Close(); // open generated XLS document in default program Process.Start("LineTypes.xls"); } } }

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

VIDEO

ON-PREMISE VERSION

Get 60 Day Free Trial or Visit ByteScout Spreadsheet SDK page

Explore ByteScout Spreadsheet SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next