Avatar of K Feening
K Feening
Flag for Australia

asked on 

Vb.net Excel Spread Sheet

Hi I am using Vb.net and I need to create an Excel Spreadsheet dynamically with Columns for name and 4 for data validation im using the folllowing
Imports System.Data.SqlClient
Imports System.Data.Sql
Imports System.Xml

Imports System.Data
Imports System.Configuration

Imports System.Windows.Forms
Imports Microsoft.Office.Interop
Imports Microsoft.Office.Interop.Excel
Imports System.Runtime.InteropServices
Imports Microsoft.Office

Imports System.IO
Imports System.Text   
Private Sub bExport_Click(sender As System.Object, e As System.EventArgs) Handles bExport.Click
Dim xlApps As Excel.Application
        Dim xlWorkBooks As Excel.Workbook
        Dim xlWorkSheets As Excel.Worksheet
        Dim misValues As Object = System.Reflection.Missing.Value
        xlApps = New Excel.ApplicationClass
        xlWorkBooks = xlApps.Workbooks.Add(misValues)
        xlWorkSheets = xlWorkBooks.Sheets("sheet1")
 Dim FiletoOpen As String = "FredFlinstone.xlsx"

End Sub

Open in new window

How do I create the required Excel sheel

Visual Basic.NET* Excel AddinsMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
K Feening

8/22/2022 - Mon