Text File to Excel

  • Thread starter Thread starter herewegoagain
  • Start date Start date
H

herewegoagain

Guest
Thank you again for reading this.
Does anyone know how to have excel import a text file along with the proper delimiters like it does in the wizard and format the columns in vb.net code? I am currently cleaning out the text file in a console application and would like excel portion to function once the "junk text" is cleaned out....
 
Could be wrong but I think youve got two choices:
Totally .NET: Write your own parser for the incoming text file and use ADO.NET to insert the rows into Excel
or
If you dont mind the performance hit of COM interoperability, you could just set a reference to the Excel Object Model and use Excels import functions.

If you go with option 2 youd likely have more luck on the VBA forum for someone that knows the Excel Object Model inside and out.
This is just my guess, no experience with this sort of thing...
 
Back
Top