[AccessD] Access To Excel via a CSV File

Gustav Brock Gustav at cactus.dk
Thu Jun 5 10:16:06 CDT 2008


Hi Max

Is it as hot on your side of the North Sea as here? Sounds like you are little dizzy!

An xls file can contain data and formatting and formulas.
An csv contains nothing but data as text.

Access can im- and export and link an Excel file with the extension xls.
Access can im- and export and link a text file with the extension csv (only older versions) or txt.

Excel can read an csv file. Default formatting will be applied.
Excel can write an csv file but everything else than data is lost.

So if you wish to export data which later can be formatted, you must use xls files.
To apply formatting etc. after the export, open the file with Excel (automation) and ask Excel to perform this.

/gustav


>>> max.wanadoo at gmail.com 05-06-2008 16:57 >>>
I thought there may be some way to turn it into an xls file and then with
(xls type code - range thingy) format it.
If I just rename it to .xls all the csv value turn into one line string.
If I try to docmd.transferspreadsheet acimport into a table and then
docmd.transferspreadsheet acexport I cannot get past first base as it won't
let me do an import.

Yes, definitely stumped.  More stumps than criket!

Max


-----Original Message-----
From: accessd-bounces at databaseadvisors.com 
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Thursday, June 05, 2008 3:44 PM
To: accessd at databaseadvisors.com 
Subject: Re: [AccessD] Access To Excel via a CSV File

Hi Max

Stumped you must be. An CSV file does not carry any fancy info, only data as
text. It is simply a text file with a funny extension.

/gustav

>>> max.wanadoo at gmail.com 05-06-2008 16:33 >>>

Can any of you Access/Excel gurus help here please.
I need to create a csv spreadsheet by code.  When it is complete, I need to
put formatting on it. Ie,make columns into Currency Types. Bold some Rows,
set some bacground colours, etc.
I have got as far as creating the CSV ok but then I am stumped.
Any advice most welcome.
Ta
Max





More information about the AccessD mailing list