473,395 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Write to excel file using VB

I'm trying to read and write from an excel file using this method..My application can read the excel file without problems but doesn't write anything to the file i want it to write. I've also tried adding a '.Value' to the end, it doesn't seem to help. I have closed the file in the end as well..

Any Suggestions would be very helpful
Expand|Select|Wrap|Line Numbers
  1.     Dim excel_app As New Excel.Application
  2.       Dim xlWkBk As Excel.Workbook
  3.       Dim xlSheet As Excel.Worksheet
  4.       Set xlWkBk = excel_app.Workbooks.Open(ExistingFile)
  5.       Set xlSheet = xlWkBk.Sheets.Item(1)
  6.       rowNum = 12
  7.  
  8. 'read from file
  9. datevalLbl.Caption = xlSheet.Cells(rowNum, 1) ' row 14 col 1
  10.  'doesnt work
  11. xlSheet.Cells(rowNum, 13) = fromText.Text
  12.  
Jul 31 '07 #1
0 1233

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: hari krishna | last post by:
hi all, My requirement is to generate xl reports throu Asp.Net without installing xl on web server computer. i am using Response object and wrtifile method as below. i dont know whether it is...
3
by: Otie | last post by:
I found the following under the GetObject help notes and in the example for GetObject: "This example uses the GetObject function to get a reference to a specific Microsoft Excel worksheet...
0
by: Zed | last post by:
I have a problem with .net writing to a remote server that I need to deploy on. The app works fine on my local machine. But when got access to the server I went to VS.NET and tried to create a...
0
by: Katie | last post by:
Our ASP.NET app produces a page in excel format using Response.ContentType = "application/vnd.ms-excel" Response.Write(strExcel) (where strExcel is a tab and carriage return delimited string) ...
1
by: sweety | last post by:
Hi, Very Urgent... I Need to write a structure of data which is in "C" to excel file(*.xls). So, using C/VC++ how i can create a Excel file and how i can write a data into the respective...
4
by: Seok Bee | last post by:
Dear Experts, I have created a script to extract the Event Logs from the system into an excel sheet. The logs are separated into 2 worksheets (Application Log and System Log). After this excel...
6
by: =?Utf-8?B?LnBhdWwu?= | last post by:
how can i write to an excel .xls file using odbc? i've read in several places that its possible but i can't find an example. i have managed to read an excel file using odbc
12
by: Reggie | last post by:
Hi And TIA. Running VS2005 and IIS7.0. I have a procedure that copies a file to a folder in my web application. When I run the project from VS it runs fine . I'm usin IE as default viewer. But...
8
blazedaces
by: blazedaces | last post by:
So I have a program below which writes an excel file with multiple sheets based on inputs of sheet names, data, cell types, etc. It uses Apache POI, which is currently the only thing I found...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.