How to format headers and sheet names in access to excel transfer

I have a little program that creates a excel spreadsheet to import data to another program, My problem is the one of the sheet names is "Service-Material Links" and after export it becomes "Service_Material Links" .
A column header is named "Display Name" but after export is labeled "DisplayName"
Another column is Named "% Bonus" I cannot name a field "% Bonus"  (I THINK)??

I think what I need is to boiler plate the sheet and column names upon export as they do not change from import to exports??

Any suggestions??
I am attaching the module 1 file which has the mapping (import Function) and the export Data function

Thanks
George
Module-1.txt
GeorgeSaletAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dale FyeOwner, Developing Solutions LLCCommented:
How are you doing your export to Excel, is it via the TransferSheet method, or are you using Excel automation to open Excel and paste your data?
GeorgeSaletAuthor Commented:
Using the transfer sheet: DoCmd.TransferSpreadsheet acExport, 10, "Services", excelfilename, True
aikimarkCommented:
You will need to use Excel automation to get the results you want.  The TransferSpreadsheet is rather generic.  You might tweak the source query to get a bit closer, but that method only goes so far.
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

PatHartmanCommented:
Regarding "Service-Material Links" vs "Service_Material Links", Excel may not allow the dash.  Check first.

You can create a query that uses alias' to rename columns and then export the query.
Jeffrey CoachmanMIS LiasonCommented:
So you are saying that this all works, ...except that the field names are a little off?
For broad compatibility, avoid non-alphanumeric characters and spaces in our object names.
Try using "Camel Case" instead.
So try changing your field names to something like this:
ServiceMaterialLinks
DisplayName
PctBonus

JeffCoachman
aikimarkCommented:
You don't have to rename the fields in your table, just alias/name them in a query (per my earlier comment)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GeorgeSaletAuthor Commented:
The alias worked for the columns
Thanks for the help
George
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.