Saturday, November 9, 2013

Open a delimit notepad file in Excel

Macro to open a delimit notepad file in Excel

Sub delimit_txt_file()

Dim fNameAndPath As String
    
fNameAndPath = Application.GetOpenFilename(FileFilter:="Text Files (*.txt), *.txt", Title:="Select File To Open")

  
Workbooks.OpenText Filename:=fNameAndPath, Origin:=xlWindows, _
StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=False _
, Space:=False, Other:=True, OtherChar:="!" ' choose ur delimit type here

End Sub

3 comments:

  1. You blog is eye-catching. I get pleasure from it. Thanks for sharing this beautiful piece of writing with me.
    dashboard designer

    ReplyDelete
  2. here is a site for easy macro learning http://www.excelmacrobasic.blogspot.in/

    ReplyDelete
  3. This post will talk about how I boiled down the information in the blog to connect my Azure VMs to this Azure File Server.online file storage

    ReplyDelete

Import data from SQL

Macro to import data from SQL using ADO connection string: Sub Import_data_from_SQL() ' Tools -> References -> Microsoft Active...