• ** There has been a recent site upgrade. Please clear your browser cache to avoid issues. **
  • New forum feature - post voting and best solution

    Check out this thread for the details: https://www.access-programmers.co.uk/forums/threads/new-forum-feature-post-voting-and-best-answer.314134/

    This new feature looks great to me! :)

  • We now have 3 forum themes

    Go for the default (light) theme, Shades of Grey or Shades of Blue. I just added the Blue one.

    The thread about it is here: https://www.access-programmers.co.uk/forums/threads/new-forum-theme-shades-of-blue.314136/

Report columns change on export to Excel (1 Viewer)

AnilBagga

Member
Local time
Today, 14:36
Joined
Apr 9, 2020
Messages
94
I have a report linked to a query. I changed the names of report headers with spaces eg "Customs Duty paid by" is the report column header where the field name is "CustomsDutyBy"

When I export using the External Data Excel tab, the report header become field names!

The option of export with formatting is greyed out. Is this the reason? How do I set it right?

See the 3 screenshots enclosed
 

Attachments

  • C3.JPG
    C3.JPG
    10.3 KB · Views: 9
  • C2.JPG
    C2.JPG
    11.8 KB · Views: 6
  • C1.JPG
    C1.JPG
    10.2 KB · Views: 7

CJ_London

Super Moderator
Staff member
Local time
Today, 10:06
Joined
Feb 19, 2013
Messages
12,536
exporting data will use field names. But fields have a caption property - so enter your 'spaced' name there, either in the table or (probably better as it is less confusing) the report recordsource query . It should then export using the caption as the column name. Try it with one field to check it works
 

AnilBagga

Member
Local time
Today, 14:36
Joined
Apr 9, 2020
Messages
94
exporting data will use field names. But fields have a caption property - so enter your 'spaced' name there, either in the table or (probably better as it is less confusing) the report recordsource query . It should then export using the caption as the column name. Try it with one field to check it works
Thank you 🙏 (y)
 

CJ_London

Super Moderator
Staff member
Local time
Today, 10:06
Joined
Feb 19, 2013
Messages
12,536
of course, you can always modify the select part your query to

SELECT CustomDutyBy AS [Custom Duty By], .....
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 05:06
Joined
Feb 19, 2002
Messages
29,705
I don't use the Caption property ever. Although in recent years, MS has fixed some of the bad things that Captions cause. I prefer the alias method in the export query if you want the names to be more user friendly.
 

Users who are viewing this thread

Top Bottom