Convert XLS into Txt

reubenfoo

Member
Joined
Nov 25, 2008
Messages
18
Location
Singapore
Programming Experience
Beginner
Hi all,

may i ask how do I convert an Excel file(.xls) into a text file(.txt) using VB.NET.

Does anyone have the coding for this?

thanks a million!
 
That's like saying "how do i convert an mp3 into a jpeg?" You'll need to be more specific about the layout of both files.

Also your question has little to do with Visual Studio itself (the environment you write programs in) so this is probably the wrong forum
 
Last edited:
XLS to TXT

hm.. i would say. the excel data would be extracted from a database into like a gridview format. from there, it should be converted into a txt format with the use of delimiters to end a line.
 
you can use the automation (loading excel into memory as an object and using it programmatically) to convert the file to csv..

..or you can use the Microsoft Jet database driver in excel mode (ConnectionStrings.com - Forgot that connection string? You will find it right here!) to access it like a db, read the file into a datatable, and then write it to disk as delimited text


See my recent edit to the other post about this topic being in the wronf section
 
Firstly, i would be selecting the excel file which is pulled from macpac, from my computer, next i would click on the button convert.

Once converted, it would generate a text file. which looks something like that

--------------------------------------------------------------------------

BANK@@@@7010052@@@@@@@@@@@@@@@@@@@@@@@65123465@@@@@@Orderin Party@@@@Sin Cash@@@@@@65123369@@@@@@@@


--------------------------------------------------------------------------
 
can you provide by way of forum attachment, a "before" and "after" file youre expecting from this process?
 
i've attached before

before.png

and after screen shots.

after.png
 

Latest posts

Back
Top