Link Search Menu Expand Document

Copy Worksheet Data To Clipboard - VB.NET

Spreadsheet SDK sample in VB.NET demonstrating ‘Copy Worksheet Data To Clipboard’

Imports System.IO
Imports System.Text
Imports Bytescout.Spreadsheet

Module Module1

    Sub Main()

        ' Spreadsheet document
        Using document As New Spreadsheet()

            ' Load Input File

            ' Create stream and export CSV data to stream
            Dim ms As New MemoryStream()
            document.Worksheet(0).SaveAsCSV(ms, vbTab)

            ' Convert memory stream to string
            Dim tabSeparatedData = Encoding.UTF8.GetString(ms.ToArray())

            ' Copy data to clipboard

        End Using

        Console.WriteLine("Data copied to clipboard")

    End Sub

End Module

Download Source Code (.zip)

Return to the previous page Explore Spreadsheet SDK