CSV dosyalarini excel'e transfer etme

Katılım
26 Aralık 2005
Mesajlar
40
Excel Vers. ve Dili
Microsoft Office Excel 2003 - Ingilizce
Merhabalar,

".CSV" dosyasini excel olarak transfer etmek icin "data" menusunden "Get external data" ordan "Import text file"'i seciyorum. Sonra transfer etmek istedigim ".csv" uzantili dosyayi secip dosyayi o sayfadaki A2 hucresine transfer ediyorum. Bu yaptigim islemleri "Record Macro" ile kaydettigim zaman su kodlar ortaya cikiyor:

With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;H:\DATA\2006week2\10jan\prognose_05122.csv" _
, Destination:=Range("A2))
.Name = "prognose_06011"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = xlWindows
.TextFileStartRow = 4
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 4, 1)
.Refresh BackgroundQuery:=False
End With

Benim makroda yapmak istedigim ama beceremedigim islem ise su:

Ayni excel sayfasina transfer edilmesi gereken bir suru ".csv" uzantili dosya var. Makroyu calistirdigimda kullaniciya transfer edilmesi gereken dosyayi sormak, kullanici o dosyayi sectikten sonra ise makro yardimiyla o dosyayi aktif bulunan sayfadaki A sutunundaki ilk bos satira koymak istiyorum.
Yani kullanici her makroyu calistirdiginda ve yeni bir dosyayi sectikce yeni gelen dosya, eskiden transfer edilen dosyalarin sonuna eklensin istiyorum. Yardimci olabilecek arkaMerhabalar,

".CSV" dosyasini excel olarak transfer etmek icin "data" menusunden "Get external data" ordan "Import text file"'i seciyorum. Sonra transfer etmek istedigim ".csv" uzantili dosyayi secip dosyayi o sayfadaki A2 hucresine transfer ediyorum. Bu yaptigim islemleri "Record Macro" ile kaydettigim zaman su kodlar ortaya cikiyor:

With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;H:\DATA\2006week2\10jan\prognose_05122.csv" _
, Destination:=Range("A2))
.Name = "prognose_06011"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = xlWindows
.TextFileStartRow = 4
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 4, 1)
.Refresh BackgroundQuery:=False
End With

Benim makroda yapmak istedigim ama beceremedigim islem ise su:

Ayni excel sayfasina transfer edilmesi gereken bir suru ".csv" uzantili dosya var. Makroyu calistirdigimda kullaniciya transfer edilmesi gereken dosyayi sormak, kullanici o dosyayi sectikten sonra ise makro yardimiyla o dosyayi aktif bulunan sayfadaki A sutunundaki ilk bos satira koymak istiyorum.
Yani kullanici her makroyu calistirdiginda ve yeni bir dosyayi sectikce yeni gelen dosya, eskiden transfer edilen dosyalarin sonuna eklensin istiyorum. Yardimci olabilecek arkdaslar varsa simdiden cok tesekkurler.
 
Üst