473,396 Members | 1,891 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,396 software developers and data experts.

how to extract excel file data into text file.

Hi friends,

I m just stuck with extracting excel file data into text file.
So can any body please help me out.
thx,
Sachin.

Dec 14 '06 #1
3 1948
Theres a million examples of interop with excel on the web. Heres one to
get you started

http://www.knowdotnet.com/articles/exceldatasource.html

--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
<gu*************@gmail.comwrote in message
news:11**********************@80g2000cwy.googlegro ups.com...
Hi friends,

I m just stuck with extracting excel file data into text file.
So can any body please help me out.
thx,
Sachin.

Dec 14 '06 #2
On 14 Dec 2006 01:10:49 -0800, "gu*************@gmail.com" <gu*************@gmail.comwrote:

¤ Hi friends,
¤
¤ I m just stuck with extracting excel file data into text file.
¤ So can any body please help me out.
¤ thx,
¤ Sachin.

The following will export to a comma delimited file:

Dim ConnectionString As String

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Test Files\Book20.xls;Extended Properties=Excel 8.0;"

Dim ExcelConnection As New System.Data.OleDb.OleDbConnection(ConnectionString )
ExcelConnection.Open()

Dim SQLString As String = "SELECT * INTO [Text;DATABASE=C:\Documents and Settings\...\My
Documents\My Database\Text].[ReportSheet.txt] FROM [ReportSheet$]"

Dim ExcelCommand As New System.Data.OleDb.OleDbCommand(SQLString, ExcelConnection)
ExcelCommand.ExecuteNonQuery()

ExcelConnection.Close()
Paul
~~~~
Microsoft MVP (Visual Basic)
Dec 15 '06 #3
On Fri, 15 Dec 2006 08:17:00 -0800, Gary L <Ga***@discussions.microsoft.comwrote:

¤ I'm trying something similar, but when I use the sample code provided I get
¤ the error message "Could not find installable ISAM" when I try to open the
¤ connection. I'm using Excel 2003 Version 11.6560.6568... Any ideas?
¤

This usually occurs when there is a syntax error in the connection string. You may want to post it
if you're still having an issue.
Paul
~~~~
Microsoft MVP (Visual Basic)
Dec 19 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Brian Hanson | last post by:
Hi, I have an unusual problem that just showed its ugly head at a pretty bad time. I have an asp.net (VB) app that takes data from an Excel sheet and puts it into SQL Server. I get the data...
1
by: pappu | last post by:
Hi friends, I m just stuck with extracting excel file data into text file. So can any body please help me out. thx, Sachin.
3
by: maylee21 | last post by:
hi, anyone can help me figure out how to read data from a text file like this: 10980012907200228082002 and extract the data according to this kind of format: Record type 1 TY-RECORD ...
1
by: manishabh77 | last post by:
I will be obliged if anybody can help me with this problem: I am trying to extract data from an excel sheet that matches IDs given in column 4 of the excel sheet.I have stored those query IDs in an...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.