The samples of source code documentation give a quick and simple method to apply a required functionality into your application. ByteScout Data Extraction Suite helps with line styles in cells with spreadsheet sdk in C#. ByteScout Data Extraction Suite is the bundle that includes three SDK tools for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK.
C# code snippet like this for ByteScout Data Extraction Suite works best when you need to quickly implement line styles in cells with spreadsheet sdk in your C# application. Follow the steps-by-step instructions from the scratch to work and copy and paste code for C# into your editor. These C# sample examples can be used in one or many applications.
ByteScout Data Extraction Suite is available as a free trial. You may get it from our website along with all other source code samples for C# applications.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
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");
}
}
}
60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page
Explore ByteScout Data Extraction Suite Documentation
Explore Samples
Sign Up for ByteScout Data Extraction Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page
Explore ByteScout Data Extraction Suite Documentation
Explore Samples
Sign Up for ByteScout Data Extraction Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: