ByteScout Spreadsheet SDK – VB.NET – Unmerge Cells

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – VB.NET – Unmerge Cells

ByteScout Spreadsheet SDK – VB.NET – Unmerge Cells

Module1.vb

Imports Bytescout.Spreadsheet
Imports System.IO

Module Module1

    Sub Main()
        ' Create new Spreadsheet
        Dim document As New Spreadsheet()
document.LoadFromFile("Input.xls")

        ' Get worksheet by name
        Dim worksheet As Worksheet = document.Workbook.Worksheets(0)

        ' Unmerge cells
        worksheet.Range("B6:D18").UnMerge()

        ' 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


  Click here to get your Free Trial version of the SDK

prev
next