[AccessD] Access To Excel via a CSV File

Shamil Salakhetdinov shamil at smsconsulting.spb.ru
Thu Jun 5 13:20:53 CDT 2008


Hello Max,

If your output .csv will have predefined format then the following tricks
could work:

- prepare formatted .xls template worksheet (let's call it myTemplate.xls);
- generate/export .csv from MS Access and assign to the output filename an
.xls extension (let's call it my.csv.xls);
- open generated my.csv.xls in XL using Automation (and all the following
actions will be performed using Automation also);
- open myTemplate.xls in XL;
- select all cells of myTemplate.xls's template worksheet;
- execute copy of selected range to clipboard;
- switch to previously opened my.csn.xls;
- select all its cells and use Paste Special->Formats... 
...

That could be it...

--
Shamil


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo
Sent: Thursday, June 05, 2008 6:34 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Access To Excel via a CSV File


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

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list