ByteScout Spreadsheet SDK - C# - Read Date From Cell - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

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.

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

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