ByteScout Spreadsheet SDK - VB.NET - Hidden Rows And Columns - 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 – VB.NET – Hidden Rows And Columns

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – VB.NET – Hidden Rows And Columns

ByteScout Spreadsheet SDK – VB.NET – Hidden Rows And Columns

Program.vb

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


  Click here to get your Free Trial version of the SDK

Tutorials:

prev
next