Link to home
Start Free TrialLog in
Avatar of Graham Gibson
Graham Gibson

asked on

Excel Spreadsheet page name is coming out with _ not a space

I am using Microsoft Access 2013 (I think) and I use DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml,
"File Name", "C:\Detailed\MyView" & ".xlsx", True,

The workbook page names comes out as "File_Name" I need the space. Thanks for any help.

Graham
Avatar of Norie
Norie

Graham

The 3rd argument of DoCmd.TransferSpreadsheet is for the name of the query you are exporting, is that query called 'File Name' or 'File_Name'?
Avatar of Graham Gibson

ASKER

It is File Name.
ASKER CERTIFIED SOLUTION
Avatar of Norie
Norie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Norie, I get a Run-time error '2302' Microsoft access can't save the output data to the file you've selected.
Graham

It works for me albeit when saving to a folder with a different name.

Have you checked the folder name/path?
Yes looks correct.
Stand by. I think I see what happened
Norie's suggestion will work.

/gustav
I had the same file name and it was deleting the old spreadsheet link and that is why I got the error. I renamed the original file name and it worked. Thank you.