ByteScout Spreadsheet SDK - C# - Read Date From Cell - ByteScout

ByteScout Spreadsheet SDK – C# – Read Date From Cell

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – C# – Read Date From Cell

How to read date from cell in C# using ByteScout Spreadsheet SDK

Tutorial on how to read date from cell in C#

The sample source code below will teach you how to read date from cell in C#. ByteScout Spreadsheet SDK is the SDK to create, read, modify and calculate spreadsheets. Formula calculations are supported, import and export to and from JSON, CSV, XML, databases, arrays and you can use it to read date from cell with C#.

Fast application programming interfaces of ByteScout Spreadsheet SDK for C# plus the instruction and the code below will help you quickly learn how to read date from cell. Just copy and paste the code into your C# application’s code and follow the instruction. Further enhancement of the code will make it more vigorous.

Trial version of ByteScout Spreadsheet SDK is available for free. Source code samples are included to help you with your C# app.

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 System.Diagnostics; using Bytescout.Spreadsheet; using System.IO; namespace HelloWorld { class Program { static void Main(string[] args) { // Create new Spreadsheet Spreadsheet document = new Spreadsheet(); document.LoadFromFile("Sample.xls"); // Get worksheet by name Worksheet worksheet = document.Workbook.Worksheets.ByName("Sheet1"); // Check dates for (int i = 0; i < 4; i++) { // Set current cell Cell currentCell = worksheet.Cell(i, 0); DateTime date = currentCell.ValueAsDateTime; // Write Date Console.WriteLine("{0}", date.ToShortDateString()); } // Close document document.Close(); // Write message Console.Write("Press any key to continue..."); // Wait user input Console.ReadKey(); } } }

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