Reading Excel (93-97) sheet with more than 65536 rows using cfspreadsheet
This is in a function, but you haven't given us the complete function.  How's your var scoping?  Maybe update your code to show us all the function.

You don't need to use the octothorpes in most cfset statements like this:

&lt;cfset count1 =#Query1.recordcount#&gt;


Could just be written as

&lt;cfset count1 =Query1.recordcount&gt;


Do you have to use SELECT * or could you specify columns?

And most importantly, and the reason it's probably timing out...  you have 2 queries.  By using UNION ALL to join them together, you're taking the 65533 rows of the first sheet and joining it to the X rows in the second sheet.  That's a pretty big dataset, especially if you're just using Excel.  Have you considered using a database?  Do you really need all this data at this point?