Group:  Microsoft Access ยป microsoft.public.access.externaldata
Thread: Retaining formatting when exporting data from Access to Excel?

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Retaining formatting when exporting data from Access to Excel?
Gilda 07.06.2006 12:26:02
When converting an access table to excel it loses it's formatting and
rearranges the columns in alpha order. How can this be prevented?
Re: Retaining formatting when exporting data from Access to Excel?
"Rick Brandt" <rickbrandt2[ at ]hotmail.com> 07.06.2006 12:50:24
Gilda wrote:
[Quoted Text]
> When converting an access table to excel it loses it's formatting and
> rearranges the columns in alpha order. How can this be prevented?

Formatting is simply a display attribute that does nothing to the underlying
raw data and it is the raw data that is exported.

Build a query that uses the Format() function (not the property) to produce
the output you want and then export the query instead of the table.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Re: Retaining formatting when exporting data from Access to Excel?
Gilda 08.06.2006 12:24:02
is there anywhere I can find info on how to do this? I understand that the
raw data remains however on a large amount of data it takes a considerable
amount of time to reformat to the format that existed in Access. Thank you
for your time and patience with this.

"Rick Brandt" wrote:

[Quoted Text]
> Gilda wrote:
> > When converting an access table to excel it loses it's formatting and
> > rearranges the columns in alpha order. How can this be prevented?
>
> Formatting is simply a display attribute that does nothing to the underlying
> raw data and it is the raw data that is exported.
>
> Build a query that uses the Format() function (not the property) to produce
> the output you want and then export the query instead of the table.
>
> --
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt at Hunter dot com
>
>
>
Re: Retaining formatting when exporting data from Access to Excel?
"Rick Brandt" <rickbrandt2[ at ]hotmail.com> 09.06.2006 11:39:22
Gilda wrote:
[Quoted Text]
> is there anywhere I can find info on how to do this? I understand
> that the raw data remains however on a large amount of data it takes
> a considerable amount of time to reformat to the format that existed
> in Access. Thank you for your time and patience with this.
>
> "Rick Brandt" wrote:

Quick explanation for one field...

New query with your single table as input. To set up a date field in the grid
(we'll say the name of this field is [EntryDate]). In the first cell have...

EntryDate: Format([TableName]![EntryDate], "yyyy-mm-dd")

When you preview the datasheet of the query you will see your date field output
with the entered format. If you were to export the query that format should be
retained. Repeat as necessary for all other fields in your table.


--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net