开发者

Data Import from .TXT to MS Access 2003

开发者 https://www.devze.com 2023-03-21 17:43 出处:网络
I have a .txt file which contains data of a Access table. Now I am using the Import utility of MS Access 2003 to import the data from the text file to a table. Theere is 开发者_开发百科one data in the

I have a .txt file which contains data of a Access table. Now I am using the Import utility of MS Access 2003 to import the data from the text file to a table. Theere is 开发者_开发百科one data in the text file which has a space at the left.therefore the data looks like this :: [ 12461]. Now when the import is completed the data in the table looks like this :: [12461]. The left space is trimmed. As a result my data is getting changed. Any help?


Well. Both leading and trailing spaces will be trimmed when you import .txt data into Access. It is the case if you specify the column data type as either Text or Number. I would suggest the following workaround which depends on how much data your have. So:

  1. Replace all spaces in your original .txt file with e.g. "^^^". It should be character(s) you know do not exist in your file.
  2. Do your regular import. Please note altered columns will be automatically typed as Text.
  3. Do Ctrl+H to replace all "^^^" with whitespace. This will fix leading spaces only, though.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号