Export query to Excel fails

J

JR Hester

Access 2007 on WinXP

When export query results to Excel, receive following error:
" The specification XMl failed to vailidate againset teh schema. There is an
error in the following line of teh XML document: A semi colon character wwas
expected.
'
"
This error is confusing as I am exporting to Excel not to an XML file. The
actual export to XML appears to complete, but I need teh XLS or XLSX file. A

Any suggestions as to how to get the query results into an Excel file?

Thank you.
 
D

Daryl S

JR -

How are you doing the export (macro, manually, code)? Post your code /
macro so we can see.
 
J

JR Hester

Daryl,

Thanks for the response, I should have been more specific. This is a manual
process, I simply open the query, then chose the Excel button on teh External
data tab. It worked at least once, because I have an excel spreadsheet from
two weeks ago. I can successfully use this process on other queries, just not
this one any longer.

Here is the SQL code for the query:

SELECT tblParticipantTrx.EmpID, tblSessions.StrtDate, tblSessions.StartTime,
tblClasses.ClassName, tblParticipants.EmpFname, tblParticipants.EmpLname
FROM (tblClasses INNER JOIN tblSessions ON tblClasses.ClassID =
tblSessions.ClassID) INNER JOIN (tblParticipants INNER JOIN tblParticipantTrx
ON tblParticipants.EmpID = tblParticipantTrx.EmpID) ON tblSessions.SessionID
= tblParticipantTrx.SessionID
WHERE (((tblSessions.StrtDate) Between [Begin] And [end]))
ORDER BY tblSessions.StrtDate;

Thank you,
 
D

Daryl S

JR -

To do it manually when the query is open, choose File | Export...
Then in the dialog box select the Excel file type you want from the bottom
"Save as type" drop-list, navigate where you want and give it a name.

--
Daryl S


JR Hester said:
Daryl,

Thanks for the response, I should have been more specific. This is a manual
process, I simply open the query, then chose the Excel button on teh External
data tab. It worked at least once, because I have an excel spreadsheet from
two weeks ago. I can successfully use this process on other queries, just not
this one any longer.

Here is the SQL code for the query:

SELECT tblParticipantTrx.EmpID, tblSessions.StrtDate, tblSessions.StartTime,
tblClasses.ClassName, tblParticipants.EmpFname, tblParticipants.EmpLname
FROM (tblClasses INNER JOIN tblSessions ON tblClasses.ClassID =
tblSessions.ClassID) INNER JOIN (tblParticipants INNER JOIN tblParticipantTrx
ON tblParticipants.EmpID = tblParticipantTrx.EmpID) ON tblSessions.SessionID
= tblParticipantTrx.SessionID
WHERE (((tblSessions.StrtDate) Between [Begin] And [end]))
ORDER BY tblSessions.StrtDate;

Thank you,



Daryl S said:
JR -

How are you doing the export (macro, manually, code)? Post your code /
macro so we can see.
 
J

JR Hester

Daryl,

Thanks for the instruction, I believe as memry serves that will work well
for Access 2002 and earlier. However, in Access 2007, the is no FIle> Export
option-- Export is a group in the External Data tab. That is the process I am
using. the problem is that on this particular query, I keep getting the error
posted in my original post.

Thanks for your response,

Daryl S said:
JR -

To do it manually when the query is open, choose File | Export...
Then in the dialog box select the Excel file type you want from the bottom
"Save as type" drop-list, navigate where you want and give it a name.

--
Daryl S


JR Hester said:
Daryl,

Thanks for the response, I should have been more specific. This is a manual
process, I simply open the query, then chose the Excel button on teh External
data tab. It worked at least once, because I have an excel spreadsheet from
two weeks ago. I can successfully use this process on other queries, just not
this one any longer.

Here is the SQL code for the query:

SELECT tblParticipantTrx.EmpID, tblSessions.StrtDate, tblSessions.StartTime,
tblClasses.ClassName, tblParticipants.EmpFname, tblParticipants.EmpLname
FROM (tblClasses INNER JOIN tblSessions ON tblClasses.ClassID =
tblSessions.ClassID) INNER JOIN (tblParticipants INNER JOIN tblParticipantTrx
ON tblParticipants.EmpID = tblParticipantTrx.EmpID) ON tblSessions.SessionID
= tblParticipantTrx.SessionID
WHERE (((tblSessions.StrtDate) Between [Begin] And [end]))
ORDER BY tblSessions.StrtDate;

Thank you,



Daryl S said:
JR -

How are you doing the export (macro, manually, code)? Post your code /
macro so we can see.

--
Daryl S


:

Access 2007 on WinXP

When export query results to Excel, receive following error:
" The specification XMl failed to vailidate againset teh schema. There is an
error in the following line of teh XML document: A semi colon character wwas
expected.
'
"
This error is confusing as I am exporting to Excel not to an XML file. The
actual export to XML appears to complete, but I need teh XLS or XLSX file. A

Any suggestions as to how to get the query results into an Excel file?

Thank you.
 
D

Daryl S

JR -

Sorry, I am on Access 2003. I do lots of exports, but if this is specific
to A2007, then you may want to repost and see if someone else can help...

--
Daryl S


JR Hester said:
Daryl,

Thanks for the instruction, I believe as memry serves that will work well
for Access 2002 and earlier. However, in Access 2007, the is no FIle> Export
option-- Export is a group in the External Data tab. That is the process I am
using. the problem is that on this particular query, I keep getting the error
posted in my original post.

Thanks for your response,

Daryl S said:
JR -

To do it manually when the query is open, choose File | Export...
Then in the dialog box select the Excel file type you want from the bottom
"Save as type" drop-list, navigate where you want and give it a name.

--
Daryl S


JR Hester said:
Daryl,

Thanks for the response, I should have been more specific. This is a manual
process, I simply open the query, then chose the Excel button on teh External
data tab. It worked at least once, because I have an excel spreadsheet from
two weeks ago. I can successfully use this process on other queries, just not
this one any longer.

Here is the SQL code for the query:

SELECT tblParticipantTrx.EmpID, tblSessions.StrtDate, tblSessions.StartTime,
tblClasses.ClassName, tblParticipants.EmpFname, tblParticipants.EmpLname
FROM (tblClasses INNER JOIN tblSessions ON tblClasses.ClassID =
tblSessions.ClassID) INNER JOIN (tblParticipants INNER JOIN tblParticipantTrx
ON tblParticipants.EmpID = tblParticipantTrx.EmpID) ON tblSessions.SessionID
= tblParticipantTrx.SessionID
WHERE (((tblSessions.StrtDate) Between [Begin] And [end]))
ORDER BY tblSessions.StrtDate;

Thank you,



:

JR -

How are you doing the export (macro, manually, code)? Post your code /
macro so we can see.

--
Daryl S


:

Access 2007 on WinXP

When export query results to Excel, receive following error:
" The specification XMl failed to vailidate againset teh schema. There is an
error in the following line of teh XML document: A semi colon character wwas
expected.
'
"
This error is confusing as I am exporting to Excel not to an XML file. The
actual export to XML appears to complete, but I need teh XLS or XLSX file. A

Any suggestions as to how to get the query results into an Excel file?

Thank you.
 
Joined
Feb 3, 2011
Messages
1
Reaction score
0
I had this same problem and got this same error message (Using Access 2010). Through a process of elimination, I deleted an ampersand (&) which I had in the title of the Query I was trying to export. That did the trick and I was able to export the Access Query to Excel with no further problems.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top