ByteScout Data Extraction Suite - VB.NET - Set date formatting in cells with spreadsheet sdk - 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 Data Extraction Suite – VB.NET – Set date formatting in cells with spreadsheet sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Data Extraction Suite – VB.NET – Set date formatting in cells with spreadsheet sdk

How to set date formatting in cells with spreadsheet sdk in VB.NET using ByteScout Data Extraction Suite

Step-by-step tutorial on how to set date formatting in cells with spreadsheet sdk in VB.NET

The sample source codes on this page shows how to set date formatting in cells with spreadsheet sdk in VB.NET. ByteScout Data Extraction Suite is the set that includes 3 SDK products for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK. It can set date formatting in cells with spreadsheet sdk in VB.NET.

Want to quickly learn? This fast application programming interfaces of ByteScout Data Extraction Suite for VB.NET plus the guidelines and the code below will help you quickly learn how to set date formatting in cells with spreadsheet sdk. Follow the instructions from scratch to work and copy the VB.NET code. Enjoy writing a code with ready-to-use sample VB.NET codes.

ByteScout Data Extraction Suite free trial version is available on our website. VB.NET and other programming languages are supported.

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

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

Module1.vb
      
Imports Bytescout.Spreadsheet Imports System.IO Imports System.Diagnostics Module Module1 Sub Main() ' Create new Spreadsheet Dim document As New Spreadsheet() ' Get worksheet by name Dim worksheet As Worksheet = document.Workbook.Worksheets.Add("Sample") ' Set captions worksheet.Cell(0, 0).Value = "#" worksheet.Cell(0, 1).Value = "Date" For i As Integer = 1 To 7 ' Set number worksheet.Cell(i, 0).Value = i ' Set current cell Dim currentCell As Cell = worksheet.Cell(i, 1) ' Set date to the current date time currentCell.ValueAsDateTime = DateTime.Now ' Set date format currentCell.NumberFormatString = "dd.mm.yyyy" Next ' remove output file if already exists If File.Exists("Output.xls") Then File.Delete("Output.xls") End If ' Save document document.SaveAs("Output.xls") ' Close Spreadsheet document.Close() ' open in default spreadsheets viewer/editor Process.Start("Output.xls") End Sub End Module

ON-PREMISE OFFLINE SDK

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

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 Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next