Importing csv file data in Excel with VBA
Closed
amisuraca
-
Aug 30, 2009 at 01:50 PM
sadgurl Posts 697 Registration date Thursday May 14, 2009 Status Member Last seen November 24, 2010 - Aug 31, 2009 at 08:25 AM
sadgurl Posts 697 Registration date Thursday May 14, 2009 Status Member Last seen November 24, 2010 - Aug 31, 2009 at 08:25 AM
Related:
- Vba excel import csv
- Import sim contacts - Guide
- Number to words in excel formula without vba - Guide
- Vba case like - Guide
- Excel marksheet - Guide
- How to open vba in excel mac - Guide
2 responses
sadgurl
Posts
697
Registration date
Thursday May 14, 2009
Status
Member
Last seen
November 24, 2010
219
Aug 30, 2009 at 03:55 PM
Aug 30, 2009 at 03:55 PM
Not sure I properly understand what you are trying to do, but the simplest way according to me is to built a vb code that read the last line, copy it and then paste it in last line +1
to find the last line, just read a colum that contain the data, loop until line content is null, this will allow you to find the last used row
last row will be empty, copy previous row content, and paste it in last row
that is for the excel sheet, but for the csv, its only database organisation
to find the last line, just read a colum that contain the data, loop until line content is null, this will allow you to find the last used row
last row will be empty, copy previous row content, and paste it in last row
that is for the excel sheet, but for the csv, its only database organisation
sadgurl
Posts
697
Registration date
Thursday May 14, 2009
Status
Member
Last seen
November 24, 2010
219
Aug 31, 2009 at 08:25 AM
Aug 31, 2009 at 08:25 AM
Can you post a sample of you Csv file? I guess it would make it easier to explain with it
if I know how are your table organised I maybe can suggest a little something, excel data can be extracted from mainly 3 ways, using cell, rows, and column location, your excel sheet is similar to a large X,Y coordinate graph, cells, rows and column are define with numbers, when you loop just increment the number used as reference
if I know how are your table organised I maybe can suggest a little something, excel data can be extracted from mainly 3 ways, using cell, rows, and column location, your excel sheet is similar to a large X,Y coordinate graph, cells, rows and column are define with numbers, when you loop just increment the number used as reference
Aug 30, 2009 at 05:41 PM
Thanks for your response! I guess I was a bit vaige about what my real challenge is here. When I import data from a csv file it is my understanding that all of the data comes in with one Querytable call. Is this right? If indeed this is right then how do I use any sort of looping structure to both insert rows and discriminate when I have read the last record of my data? It seems to me that all of the data just come flooding in and I cannot read the data from a csv file from one comma to the next comma inside of a loop. I hope this clears up my question. Thanks again in advance for everyones help.
amisuraca