Text into Columns in Excel using console application
I have imported a .txt file to excel but I want to turn the text into columns. Using the Excel interface I would do that like this: Data->Text to Columns etc. Any ideas on how to do that using visual basic commands? Thank you in advance.
Code:
Imports System.Diagnostics
Module Module1
Sub Main()
Dim p As New Process()
p.StartInfo = New ProcessStartInfo("excel.exe", "C:\text.txt")
p.Start()
End Sub
End Module
Re: Text into Columns in Excel using console application
If you want to be able to automate the UI then don't use Process.Start to start the application. You need to create an Excel application object in your code so that you can access the API. Start by reading up on Excel automation and then you can find the specific members to use to invoke the function you want.
https://www.google.com.au/search?q=v...CcHDmAX8ioDwCg