|
-
Apr 12th, 2004, 09:24 AM
#1
Thread Starter
Fanatic Member
excel
Hi everyone,
The following code is in vb.net which simply opens a new instance of excel and places data into the cells of the sheet of the excel.
Can someone please send me a C# version of this?
Thanks
Dim oExcel As New Excel.Application
Dim oWorkBook As Excel.Workbook
Dim oSheet As Excel.Worksheet
private sub PopulateExcel()
Dim oRng As Excel.Range
oWorkBook = oExcel.Workbooks.Add
oSheet = oWorkBook.ActiveSheet
oExcel.Visible = True
With oSheet
.Range("A1").Value = "ID"
.Range("A1").Font.Bold = True
.Range("B1").Value = "First Name"
.Range("B1").Font.Bold = True
End With
end sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|