![]() |
Importing from CSV file with the BASIC procedure
Hi,
Can someone help me? I need to write THE BASIC vba procedure to extract a ..csv (first name , last name) that will be sent to colums (A10:A20) and (B10:B20). Thanks. Joe |
Importing from CSV file with the BASIC procedure
I used a learn macro and got the following code. You can eliminate a number
of the parameters. they aren't really needed. I added a comment to these unecessary lines Sub Macro1() ' ' Macro1 Macro ' Macro recorded 6/13/2007 by Joel ' ' With ActiveSheet.QueryTables.Add(Connection:="TEXT;C:\T EMP\f_l.csv", _ Destination:=Range("A10")) .Name = "f_l" .FieldNames = True ' .RowNumbers = False ' .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False ' .RefreshStyle = xlInsertDeleteCells ' .SavePassword = False .SaveData = True .AdjustColumnWidth = True ' .RefreshPeriod = 0 ' .TextFilePromptOnRefresh = False ' .TextFilePlatform = 437 ' .TextFileStartRow = 1 .TextFileParseType = xlDelimited .TextFileTextQualifier = xlTextQualifierDoubleQuote .TextFileConsecutiveDelimiter = False ' .TextFileTabDelimiter = False ' .TextFileSemicolonDelimiter = False .TextFileCommaDelimiter = True ' .TextFileSpaceDelimiter = False .TextFileColumnDataTypes = Array(1, 1) ' .TextFileTrailingMinusNumbers = True ' .Refresh BackgroundQuery:=False End With End Sub "Jack" wrote: Hi, Can someone help me? I need to write THE BASIC vba procedure to extract a .csv (first name , last name) that will be sent to colums (A10:A20) and (B10:B20). Thanks. Joe |
All times are GMT +1. The time now is 02:29 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com