PC Review


Reply
Thread Tools Rate Thread

DoCmd line to save an .xls as .csv

 
 
SoDakRah
Guest
Posts: n/a
 
      29th Jul 2008
I recieve a file in .xls format and must read it as .csv without wanting to
open the file in Excel and saving it as .csv. Is there a way using a DoCmd
to accomplish the same task?
 
Reply With Quote
 
 
 
 
Pete D.
Guest
Posts: n/a
 
      29th Jul 2008
CVS would be down grading the file import abilities. Why must you import it
as CSV? Why not link to it and use a query to fix it up?
"SoDakRah" <(E-Mail Removed)> wrote in message
news:665ED63D-BDE1-49B8-9C39-(E-Mail Removed)...
>I recieve a file in .xls format and must read it as .csv without wanting to
> open the file in Excel and saving it as .csv. Is there a way using a
> DoCmd
> to accomplish the same task?



 
Reply With Quote
 
SoDakRah
Guest
Posts: n/a
 
      31st Jul 2008
I should have clarified things. The file I recieve is a datastream with only
CR's at the end of the record. No comma or tab charaters. It is sent to me
with a .xls extension not excel formating. The more I think about it, I only
need to read the first 10 characters of each line so that might simplify
things. Can I write code to open the file and loop through the file getting
just the first 10 characters and output them to a temporary table?

"Pete D." wrote:

> CVS would be down grading the file import abilities. Why must you import it
> as CSV? Why not link to it and use a query to fix it up?
> "SoDakRah" <(E-Mail Removed)> wrote in message
> news:665ED63D-BDE1-49B8-9C39-(E-Mail Removed)...
> >I recieve a file in .xls format and must read it as .csv without wanting to
> > open the file in Excel and saving it as .csv. Is there a way using a
> > DoCmd
> > to accomplish the same task?

>
>
>

 
Reply With Quote
 
Pete D.
Guest
Posts: n/a
 
      1st Aug 2008
Please don't take this wrong! There is something wrong if you recieve it
with XLS extension and it is just a text file (I assume from your
description). That being said, first thing is to rename the file to
something Access can understand what it is such as ".txt". With the xls
extension it isn't going to provide you the options you want. Now you can
create an import specification for the file, save it and use a macro to
import it over and over. You can easily import the first 10 characters
using the native import abilities of access once it know this is a text
file.

"SoDakRah" <(E-Mail Removed)> wrote in message
news:0167254F-6B98-4318-A23C-(E-Mail Removed)...
>I should have clarified things. The file I recieve is a datastream with
>only
> CR's at the end of the record. No comma or tab charaters. It is sent to
> me
> with a .xls extension not excel formating. The more I think about it, I
> only
> need to read the first 10 characters of each line so that might simplify
> things. Can I write code to open the file and loop through the file
> getting
> just the first 10 characters and output them to a temporary table?
>
> "Pete D." wrote:
>
>> CVS would be down grading the file import abilities. Why must you import
>> it
>> as CSV? Why not link to it and use a query to fix it up?
>> "SoDakRah" <(E-Mail Removed)> wrote in message
>> news:665ED63D-BDE1-49B8-9C39-(E-Mail Removed)...
>> >I recieve a file in .xls format and must read it as .csv without wanting
>> >to
>> > open the file in Excel and saving it as .csv. Is there a way using a
>> > DoCmd
>> > to accomplish the same task?

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Docmd.Save mscertified Microsoft Access Form Coding 2 20th Mar 2008 03:15 PM
Change color for docmd subject line =?Utf-8?B?SmFl?= Microsoft Access 4 12th Jul 2007 02:24 PM
DoCmd.Save Rohan via AccessMonster.com Microsoft Access Form Coding 2 24th Jan 2006 03:56 AM
Error DoCmd.RunSql Line Alain Microsoft Access ADP SQL Server 1 12th May 2004 05:41 AM
Help using DoCmd.Save Hafeez Esmail Microsoft Access VBA Modules 8 9th Oct 2003 05:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:52 PM.