The coding tutorials are designed to help you test the features without need to write your own code. 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. It can read number format in cell in VB.NET.
Fast application programming interfaces of ByteScout Spreadsheet SDK for VB.NET plus the instruction and the code below will help you quickly learn how to read number format in cell. In your VB.NET project or application you may simply copy & paste the code and then run your app! Code testing will allow the function to be tested and work properly with your data.
Our website provides trial version of ByteScout Spreadsheet SDK for free. It also includes documentation and source code samples.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
Imports Bytescout.Spreadsheet
Imports Bytescout.Spreadsheet.Constants
Imports System.IO
Module Module1
Sub Main()
' Create new Spreadsheet
Dim document As New Spreadsheet()
document.LoadFromFile("Data.xls")
' Get worksheet by name
Dim worksheet As Worksheet = document.Workbook.Worksheets.ByName("Sample")
' Check dates
For i As Integer = 0 To 7
For j As Integer = 0 To 1
' Set current cell
Dim currentCell As Cell = worksheet.Cell(i, j)
' Get format type
Dim formatType As NumberFormatType = currentCell.ValueDataTypeByNumberFormatString
' Write line
Console.Write("Cell({0}:{1}) type is {2}. Value : ", i, j, formatType.ToString())
Select Case formatType
Case formatType.DateTime
' Read datetime
Dim datm As DateTime = currentCell.ValueAsDateTime
' Write date to console output
Console.Write(datm.ToString())
Case formatType.General
' Write value to console output
Console.Write(currentCell.Value)
End Select
Console.WriteLine()
Next
Next
' Close document
document.Close()
Console.ReadKey()
End Sub
End Module
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: