Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 23rd, 2009, 05:12 AM
Authorized User
 
Join Date: Feb 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default VB.Net 3.5 To Read and Wtrite Excel

Any easy VB.Net sample code to read and to write an Excel file?
  #2 (permalink)  
Old December 9th, 2013, 03:30 AM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2013
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: VB.Net 3.5 To Read and Wtrite Excel

Hi, there are quite a few approaches to achieve this, but to me one of the easiest ways would be with this VB.NET Excel component.
It presents a workbook content in a very intuitive hierarchical structure, also it has a simple and clean API.
Here is a sample how you can read Excel files in .NET, make some simple changes on it and save it:
Code:
' Load Excel file.
Dim workbook = ExcelFile.Load("Workbook.xls")

' Select active worksheet.
Dim worksheet = workbook.Worksheets.ActiveWorksheet

' Change the value of the cell "A1".
worksheet.Cells("A1").Value = "Hello world!"

' Save the file in XLS format.
workbook.Save("NewWorkbook.xls")
  #3 (permalink)  
Old December 12th, 2013, 01:44 AM
Authorized User
 
Join Date: Nov 2013
Location: Fort Worth
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
Default

That is indeed very simple. Works for me as well.
__________________
123movies
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read an already open Excel file in VB.NET sunilr General .NET 4 February 28th, 2014 07:20 AM
read/send email using WEBDEV and vb.net prashanthudupa.k Excel VBA 0 September 21st, 2006 06:39 AM
Why use VB.Net to read Access? AmyEL VB.NET 2002/2003 Basics 3 February 24th, 2005 12:12 PM
Read text file and out to serial port VB.net noomkmitl Pro VB.NET 2002/2003 0 December 27th, 2004 08:44 AM
How to read out a outlook inbox in VB.NET splanky VB How-To 0 December 10th, 2003 11:06 AM



All times are GMT -4. The time now is 07:48 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.