Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Excel data to and from a Windows application

Posted on 2007-04-01
4
Medium Priority
?
154 Views
Last Modified: 2013-12-25
I am new to programming so I do not know a lot of simple things so here goes.  How do I read 1 cell from Excel worksheet and put its contents into a textbox in a windows application also put data froma textbox into an excel cell? vb.net
0
Comment
Question by:teagardan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18832734
did you already look at code samples to automate Microsoft Excel as from vb.net?
http://www.google.lu/search?q=vb.net+automate+excel&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:de:official&client=firefox-a
it's almost straightforward...
0
 

Author Comment

by:teagardan
ID: 18833719
I am using VB 2005 and the examples are usually in vb 6 or earlier and they will not convert when I try to open them in visual studio 2005 I get errors.
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1000 total points
ID: 18834422
the very first hit I got:
http://www.vbdotnetheaven.com/UploadFile/ggaganesh/ExcelSpreadsheet04182005093012AM/ExcelSpreadsheet.aspx

you need only to change the
Dim workbook As _Workbook = workbooks.Add
into:
Dim workbook As _Workbook = workbooks.Open("yourfilepath")

and
Dim range1 As Range = worksheet.get_Range("A1", Missing.Value)

then see point 5 to set the value



note this VERY important support note from MS about automating office applications:
http://support.microsoft.com/kb/317109

0
 

Author Comment

by:teagardan
ID: 18842707
Thank you I will give this a try today
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question