lopiteaux
Board Regular
- Joined
- Jun 8, 2011
- Messages
- 77
Hi all,
I'm having a few problems when exporting a dataset from Access to Excel (both 2003 - not by choice) and I was hoping someone on this forum could help, seeing as I've pretty much hit dead ends everywhere else.
Basically the central them of my question is this: how can I set output formats for the data when exporting from an Access table to Excel 1997-2003? The best example to point out in this case would be the date, which - no matter what format it's entered in in Access, or which format the field properties are set to - comes out as dd-mmm-yy. In this case, I'd like to have the data in short date format, i.e. dd/mm/yyy.
Currently I'm exporting the table through a macro - built in the noob macro builder inherent in Access, i.e. no digging in the coding behind the scenes (I'm pretty adept at VBA in Excel, but have yet to tackle this in Access... welcome to take on any ideas and/or advice on how to better this export function in pure hard black & white code!)... so yes, as I was saying, the export is done via an 'OutputTo' function in the macro builder, with the following parameters:
I'm having a few problems when exporting a dataset from Access to Excel (both 2003 - not by choice) and I was hoping someone on this forum could help, seeing as I've pretty much hit dead ends everywhere else.
Basically the central them of my question is this: how can I set output formats for the data when exporting from an Access table to Excel 1997-2003? The best example to point out in this case would be the date, which - no matter what format it's entered in in Access, or which format the field properties are set to - comes out as dd-mmm-yy. In this case, I'd like to have the data in short date format, i.e. dd/mm/yyy.
Currently I'm exporting the table through a macro - built in the noob macro builder inherent in Access, i.e. no digging in the coding behind the scenes (I'm pretty adept at VBA in Excel, but have yet to tackle this in Access... welcome to take on any ideas and/or advice on how to better this export function in pure hard black & white code!)... so yes, as I was saying, the export is done via an 'OutputTo' function in the macro builder, with the following parameters:
OutputTo
Object Type = Table
Object Name = X
Output Format = Microsoft Excel 97-2003 (*.xls)
Output File = X
Auto Start = Yes
The date format is the most important setting for the time being, but I'd love to know how I can program the Query (either in Design view or by code, although I have no experience coding in Access or SQL) to do the following:
1) Export dates as "dd/mm/yyyy";
2) Export dataset sorted by a particular column;
3) Export the dataset as a .csv and not .xls;
Object Type = Table
Object Name = X
Output Format = Microsoft Excel 97-2003 (*.xls)
Output File = X
Auto Start = Yes
The date format is the most important setting for the time being, but I'd love to know how I can program the Query (either in Design view or by code, although I have no experience coding in Access or SQL) to do the following:
1) Export dates as "dd/mm/yyyy";
2) Export dataset sorted by a particular column;
3) Export the dataset as a .csv and not .xls;
4) Last but definitely not least, format cells to a specified font, specified colour, without text-wrapping, and autofitted along the columns.
Any thoughts and help would be greatly appreciated!
Thanks,
Carel.
Any thoughts and help would be greatly appreciated!
Thanks,
Carel.