What I'm trying to do is to merge user selected CSV files with same header. I read the first csv file and put the header into an array. Then read the body data and put it into two dimension array like this.
Following is incomplete code. I removed some unconcerned codes for clarity.
Problem is I can't enlarge the csvFinalData row size while preserving data according to this site.Please Login or Register to view this content.
Is there any workaround to implement what I want to do? Any input would be greatly appreciated. Thanks for your precious time.Only the upper bound of the last dimension in a multidimensional array can be changed when you use the Preserve keyword; if you change any of the other dimensions, or the lower bound of the last dimension, a run-time error occurs. Thus, you can use code like this:
ReDim Preserve Matrix(10, UBound(Matrix, 2) + 1)
But you cannot use this code:
ReDim Preserve Matrix(UBound(Matrix, 1) + 1, 10)
Bookmarks