The text of this article is not in this database — only its details are. Read it on the old site: Creating an Excel Spreadsheet programmatically using VB.NET
15 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
sinoai aroneditedPosted Jun 16, 2011, 5:45 PMEdited Jun 16, 2011, 5:48 PM
You can create nicely formatted Excel files using this library: http://officehelper.codeplex.com/documentation Important note: Microsoft Office does not need to be installed!
Lefteris GkinisPosted Apr 8, 2011, 10:50 AM
I have deploy the above code but in the line: range1.GetType().InvokeMember("Value", BindingFlags.SetProperty, Nothing, range1, args1) returns me an error: Exception has been thrown by the target of an invocation. Why is that?
Jack BakereditedPosted Feb 20, 2011, 10:48 PMEdited Feb 20, 2011, 10:53 PM
Hi, To create excel without ADO and MS Excel automation in VB.NET you need .NET component. Excel Jetcell .NET component allows to read write excel spreadsheet in VB.NET. To visit Excel Jetcell .NET homepage you will find many VB.NET and C# examples how to create excel files XLSX XLS CSV. For example see VB.NET code to create excel spreadsheet from array: Imports DTG.Spreadsheet ... Dim WBook = New ExcelWorkbook() WBook.Worksheets.Add("ArrayValues") For i As Short = 0 To 10 For j As Short = 0 To 10 WBook.Worksheets(0).Cells[i,j].Value = arr(i,j) j = j + 1 Next j i = i + 1 Next i WBook.WriteXLSX("ExcelSpreadsheet.xlsx")
Saad SaulatPosted Feb 16, 2011, 4:13 AM
For source code of excel connection creation function with vb.net,visit: http://bitsbyta.blogspot.com/2011/01/how-to-create-excel-connection-vbnet.html
vilas jadhavPosted Feb 3, 2011, 7:23 AM
I getting the Err of ISAM , how solve this Error , please check and do needful ........ Dim Conn As New OleDbConnection Dim Comm As New OleDbCommand Conn.ConnectionString = CreateConnString("C:\Documents and Settings\Administrator\Desktop\utility_template_vilas\New Folder\test.xls") Comm.Connection = Conn Comm.CommandText = _ "select * from [CD$] where IsNull(Jt_Itm_Num)" ' '"select * from [CD$] where Not(IsNull(Jt_Itm_Num))" '''''''''''''''add new for testing ................ Dim oleda As OleDbDataAdapter = New OleDbDataAdapter() oleda.SelectCommand = Comm Dim ds As DataSet = New DataSet() ' Fill the DataSet from the data extracted from the worksheet. oleda.Fill(ds, "Employees") please check and do needful Thanks and regards vilas
MDeLeonPosted Dec 24, 2010, 12:59 AM
If you need to create Excel 2007/2010 files then give this open source a try: http://closedxml.codeplex.com
Mukesh RahulPosted Nov 26, 2010, 2:14 AM
can access data or record from my bv .net project to word? if yes kindly help me how?
Joe ThomasPosted Aug 27, 2010, 1:26 PM
Is it possible to accomplish Excel automation without having the Excel app itself installed?
harry peterPosted Jul 31, 2010, 8:30 AM
There is other way to read and write Excel c#, vb.net excel, asp.net excel, just use Spire.XLS, without ole excel automation need. http://www.e-iceblue.com/Introduce/excel-for-net-introduce.html
FASPosted Nov 11, 2009, 2:48 PM
Goooooooood job
Rakesh LimjePosted May 28, 2009, 1:03 PM
it is well understandable and easy to use code. thanks
Seema VashiPosted Apr 23, 2009, 5:33 AM
I want to export Data in Excel in web application.
Linh NguyenPosted Apr 1, 2009, 4:57 AM
How to add ASPNET in DCOMCNFG but we don't use the step, instead we use the code to auto add ASPNET value in DCOM. because if we upto the host, we don't change the property of DCOM. Please help me Thanhk so much
kar kareditedPosted Jun 20, 2006, 12:55 PMEdited Jun 20, 2006, 12:59 PM
How add excel object to windows vbnet form. thank you sample http://www.karpodinis.gr/Image1.jpg Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim EXL As Object EXL = CreateObject("Excel.Application") EXL.Workbooks.Open(Application.StartupPath & "\sample.xls", , , , , , , , True) End Sub