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.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

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"); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Explore Samples

Sign Up for ByteScout Spreadsheet SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Explore Samples

Sign Up for ByteScout Spreadsheet SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next