Thursday, 15 September 2011

csv - VBA Importing long file names -


One on my desktop The Csv file is I. The file name is too long and includes special characters such as brackets like:

  [abcd 012015] accent 1117 - section a10 grade-20150316_1 937-comma_sepated csv  is 

where filename is the first 36 characters would change every instance of downloads remaining constant file name I file to try VBA to import access with a Dusimdi. Transfertext and I get errors I have come to know that there is a limitation of the file name that can handle DoCmd.TransfertText , so, I need to manually rename the file, then I will use VBA I can use. Changing the file name is relatively easy with VBA, but I would like to use the information provided in the original file name such as Section A10 (which makes it unique because other streams are labeled A01, A02, etc.) and name Replace. The CSV file is named as A10.csv, so it means that searching the string and changing it. Since the segment can be different, how do I write the code and rename the file, then import it with VBA? So, I still have bits and pieces but can not keep them together:

  NewPathName DoCmd.TransferText acImport, "AME_Grades", strTable, strPathFile, blnHasFieldNames as the name OldPathName < / Code> 

Am I using Access Tabulation AME_Grades Any suggestions for making it cleaner in the Access Table? TS

I recommend using it before importing the data from the CSV file in MS Access.

  as dim as string, NewPath name string, old designation = "Fulpath Tovervir freakish Langfailnam. Csv" Nupathanam = "Fulpathtourfailnam. Csv" Failkapi vintage old name, Nupathanapeedimdi. Transfer Text AIMport, "AME Grade", Stableable, Nupath, Blanhasfelden  

No comments:

Post a Comment