473,406 Members | 2,956 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,406 software developers and data experts.

Opening .csv file in excell

hi guys

I want to open a .csv file in excell from vb.net. I tried using the code

Dim xlsApp As Excel.ApplicationClass
Dim xlsWB As Excel.WorkbookClass
Dim xlsSheet As Excel.WorksheetClass
'Dim xlsCell As Excel.Range
Dim xlsDatei As String

xlsApp = New Excel.ApplicationClass
xlsApp.Visible = True
xlsWB = xlsApp.Workbooks.Open("C:\Reporttestrak.csv")
'xlsapp.
'xlsApp.FileFind.Load("C:\Consolidated.csv")
xlsSheet = xlsWB.Worksheets(1)
'xlsCell = xlsSheet.Range("A1")

but it's not working....

Can some one help me in solving this issue..
Nov 23 '06 #1
1 1351
dotexe
13
hi guys

I want to open a .csv file in excell from vb.net. I tried using the code

Dim xlsApp As Excel.ApplicationClass
Dim xlsWB As Excel.WorkbookClass
Dim xlsSheet As Excel.WorksheetClass
'Dim xlsCell As Excel.Range
Dim xlsDatei As String

xlsApp = New Excel.ApplicationClass
xlsApp.Visible = True
xlsWB = xlsApp.Workbooks.Open("C:\Reporttestrak.csv")
'xlsapp.
'xlsApp.FileFind.Load("C:\Consolidated.csv")
xlsSheet = xlsWB.Worksheets(1)
'xlsCell = xlsSheet.Range("A1")

but it's not working....

Can some one help me in solving this issue..
CSV file is nothing but a text file where all the data are supperated by comma','
On that there is no multple sheets.

use streamreader sr1 = new streamreader(@"filepath" )
sr1.read,sr1.readline,sr1.readtoend

if you dont understand reply.
Nov 23 '06 #2

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

Similar topics

2
by: Robert Halstead | last post by:
Hi guys, I have a asp.net web app and it's connecting to an excell 2003 document (in another folder) via OleDataAdapter. Everything works and all, it's just that when I shutdown IE and try to...
4
by: Pieter | last post by:
Hi, From my VB.NET 2005 application I need to be able to open Files an Directory's with their default application: - A word-doc must open in word - A excell-document in Excel etc - in case...
6
by: jw | last post by:
i have datas in an excel file like this: names surnames jack white smith black marry brown how can i read these datas for ex i know that names in the cell A1 and surnames is...
1
by: Lamis | last post by:
Hi, I have an excell file with 4 sheets. I want to read each sheet (with VB ..net) and insert it to different tables in my database.. How can do that in a smart way? -- LZ
2
by: noopathan | last post by:
Hi experts , I have an excel file in the below format --------------------------------------------------------------------- CodeID CodeName Market Name Date...
2
seshu
by: seshu | last post by:
hi every body This is seshu i have doubt in mysql i have some date in excell sheet to export that data i have copied all the data into a text file and the wrote this code in...
2
by: glibo | last post by:
I am trying to change the tab name when i open a excell spread sheet on the run time in c#. I changed it in the code: Response.AddHeader("content-disposition","filename=" + sFileName + ".xls");...
1
by: thripurari | last post by:
Hi ! Dear all! I am getting a problem while binding the data source to the ultragrid . pls can any one could help me to bind the excell file to my ultra grid. My Question is: How to bind the...
1
Ali Rizwan
by: Ali Rizwan | last post by:
Hi all, I m creating a database. The data for database will fetched from an excell sheet. Now how can i read an excell sheet and update my database with that excell sheet. Or I want to show...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.