Hi there
I have a bunch of csv files, and each file is data from 1 day. The csv files follow this structure:
# Wed Oct 5 2011 12:00:03 EDT 2011
# URL:http://abc.com/go_here_for this data/get_data?some_param1=true&Date=02-Sep-2011&some_param2=123
#header1,header2,header3,
data1,data2,data3
data4,data5,data6
I need to import all this data into 1 table in an xlsx file which looks like this:
date,header1,header2,header3
date_csv1,data1,data2,data3
date_csv1,data4,data5,data6
date_csv2,data7,data8,data9
etc.
Although I've programmed in college, I'm pretty new at programming macros. Could somebody point me to what are some of the functions that would be useful to accomplish this? The pseudo-code I've come up with is:
csvfiles=list of csv files
while csvfiles
open current_csvfile
data_date=date from current_csvfile.row3
add data_date to col1 of every row starting row4 to eof
copy current_csvfile.row4:current_csvfile.eof
paste current_csvfile.row4:current_csvfile.eof to table.starting.col2
csvfiles=remove_first_file
end
Bookmarks