Source code documentation samples provide quick and easy way to add a required functionality into your application. ByteScout Spreadsheet SDK is the SDK component for writing, reading, modifying and calculating Excel and CSV spreadsheets. Can calculate and reculculate formulas with Excel installed. You may import or export data to and from CSV, XML, JSON. Supports export to databases, arrays, streams. It can set hidden rows and columns in VB.NET.
This code snippet below for ByteScout Spreadsheet SDK works best when you need to quickly set hidden rows and columns in your VB.NET application. In order to implement the functionality, you should copy and paste this code for VB.NET below into your code editor with your app, compile and run your application. Use of ByteScout Spreadsheet SDK in VB.NET is also explained in the documentation included along with the product.
Trial version of ByteScout Spreadsheet SDK is available for free. Source code samples are included to help you with your VB.NET app.
Imports System.Diagnostics Imports System.IO Imports Bytescout.Spreadsheet Class Program Friend Shared Sub Main(args As String()) ' Open spreadsheet from file Dim document As New Spreadsheet() document.LoadFromFile("example.xls") ' Get first worksheet Dim worksheet As Worksheet = document.Workbook.Worksheets(0) 'Hide first three columns worksheet.Columns(0).Hidden = True worksheet.Columns(1).Hidden = True worksheet.Columns(2).Hidden = True 'Hide first three rows worksheet.Rows(0).Hidden = True worksheet.Rows(1).Hidden = True worksheet.Rows(2).Hidden = True ' Delete output file if exists If File.Exists("changed.xls") Then File.Delete("changed.xls") End If ' Save document document.SaveAs("changed.xls") ' Close spreadsheet document.Close() ' Open generated XLS document in default program Process.Start("changed.xls") End Sub End Class