Lobster1071
Registered User.
- Local time
- Today, 15:56
- Joined
- May 18, 2008
- Messages
- 23
I’m trying to write a program to do the simplest task, but of course I am stuck on how to accomplish this.
The program is going to do this…
1) Import an Excel file
2) Remove trailing blanks from all fields
3) Export it as a DBF file
Sounds unbelievably easy, right? I can do steps 1 and 3 with no problem of course. It’s step 2 that I need a little advice.
You see, I never know the format of the Excel file that I will be importing. I never know what fields I’m getting. If the field names were fixed, it would be no problem.
Obviously I need to use the RTrim function once it's imported, but it’s the non-constant field names that I am having a problem with. Would be nice to use something like a “Scatter Memvar” from FoxPro, but I know there’s no equivalent function in Access.
Also, I would think I would need to use some function to check that the field that I am removing the blanks from is a Text field. I couldn’t of course remove trailing blanks from a Numeric or Date field if it happens to import from Excel that way.
Can anyone possibly point me in the right direction?
Thanks.
The program is going to do this…
1) Import an Excel file
2) Remove trailing blanks from all fields
3) Export it as a DBF file
Sounds unbelievably easy, right? I can do steps 1 and 3 with no problem of course. It’s step 2 that I need a little advice.
You see, I never know the format of the Excel file that I will be importing. I never know what fields I’m getting. If the field names were fixed, it would be no problem.
Obviously I need to use the RTrim function once it's imported, but it’s the non-constant field names that I am having a problem with. Would be nice to use something like a “Scatter Memvar” from FoxPro, but I know there’s no equivalent function in Access.
Also, I would think I would need to use some function to check that the field that I am removing the blanks from is a Text field. I couldn’t of course remove trailing blanks from a Numeric or Date field if it happens to import from Excel that way.
Can anyone possibly point me in the right direction?
Thanks.