Welcome to Windows Help!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

change file type via code

 
   Windows Help (Home) -> Microsoft Access RSS
Next:  Desktop in Windows  
Author Message
mhmaid

External


Since: Jun 21, 2009
Posts: 1



(Msg. 1) Posted: Sun Jun 21, 2009 7:03 am
Post subject: change file type via code
Archived from groups: microsoft>public>access (more info?)

I have more than 200 excel sheets files , each file contains one record
these files are created automatically thru our mdis system , which will
export the date of a single record to a xl file ,

what i want to do is , importing the data to a new table in access
when i try to open , i got an error msg , because the files are saved as
text( tab delimited)

in order to be able to import a file to access , i first need to open each
file and save it as of type excel

but is is possible to change the type of all of the files by code
all files are kept in one folder in c drive

hope some ones knows how to do this
thanks

 >> Stay informed about: change file type via code 
Back to top
Login to vote
kc-mass

External


Since: Jun 21, 2009
Posts: 2



(Msg. 2) Posted: Sun Jun 21, 2009 10:51 am
Post subject: Re: change file type via code
Archived from groups: per prev. post (more info?)

There is no need to open the files in Excel. You can import the delimited
data directly
to an access table. Look in the Access help for "TransferText".

Regards

Kevin


"mhmaid" wrote in message

>I have more than 200 excel sheets files , each file contains one record
> these files are created automatically thru our mdis system , which will
> export the date of a single record to a xl file ,
>
> what i want to do is , importing the data to a new table in access
> when i try to open , i got an error msg , because the files are saved as
> text( tab delimited)
>
> in order to be able to import a file to access , i first need to open each
> file and save it as of type excel
>
> but is is possible to change the type of all of the files by code
> all files are kept in one folder in c drive
>
> hope some ones knows how to do this
> thanks
>

 >> Stay informed about: change file type via code 
Back to top
Login to vote
Arvin Meyer MVP

External


Since: Mar 12, 2009
Posts: 10



(Msg. 3) Posted: Sun Jun 21, 2009 11:03 am
Post subject: Re: change file type via code
Archived from groups: per prev. post (more info?)

mhmaid wrote:
> I have more than 200 excel sheets files , each file contains one
> record these files are created automatically thru our mdis system ,
> which will export the date of a single record to a xl file ,
>
> what i want to do is , importing the data to a new table in access
> when i try to open , i got an error msg , because the files are saved
> as text( tab delimited)
>
> in order to be able to import a file to access , i first need to open
> each file and save it as of type excel
>
> but is is possible to change the type of all of the files by code
> all files are kept in one folder in c drive

Access will directly open and read various types of files including TXT,
CSV, and XLS files without any changing or conversion. Set your import
dialog to the proper filetype and you won't have to worry about converting
anything. If you want to rename files, use the Mid() function to find the
first instance of a . (period or dot) and capture the rest of the filename
(the extension) the use rename to change it as in:

RENAME [drive:][path]filename1 filename2

or:

REN [drive:][path]filename1 filename2
 >> Stay informed about: change file type via code 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Help with code - Can someone help me with this code. I would like a new case note to be made when the user clicks on the button. However the code I have meshed together keeps bringing up the first record instead of a brand new record. Private Sub newrcd_Click() Dim..

Combo Code Help Please - I am using: Me.filter = "[district name] = """ & Me.combo22 & """" Me.filteron = true to filter a combo for school district. The user can pick a district and projects for that district comes up. If a distr...

Error!! No Code #! - In an AR database, I can go into a customer and view and print invoices and add new ones, but I can not print an aging report, it just comes up with an error but no reference or code number. How can I repair the database so I can run a report?

code only works when run twice, why? - I have an OLE unbound frame linked to a Word 2007 document on a form and on a subform embedded in a report. And the following code will change the Source Doc property files. But it has to be run twice to accomplish the changes. I am at a loss for..

Send email through code - I have a table that I loop through to get record selection criteria and email addresses. Within this loop I send an email consisting of a pdf file attachment. When I use Outlook I get the pesky "sending on behalf of" message so I changed to use...
   Windows Help (Home) -> Microsoft Access All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]