Buoansera a tutti.

Sto cercando di creare con FSO un file excel ed aprirlo con una stringa di connessione, in questo modo:

codice:
Function genera(Max, Min, MaxChar) 
	Dim codice, cifra
	For i = 1 To MaxChar 
		Randomize timer
		codice = Int((Max * Rnd()) + 1) 
		cifra = cifra & codice
	Next 
	genera = cifra
End Function 

strVar = lcase(genera(91, 48, 5))

NomeFile = strVar &".xls"
   Set fso = CreateObject("Scripting.FileSystemObject") 
   fso.createtextfile(NomeFile)
Set Fso = nothing

Set Cn = Server.CreateObject("ADODB.Connection")
OpenCn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath(strVar &".xls")&";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"""
Cn.Open OpenCn
Il file viene creato ma:

Microsoft JET Database Engine error '80004005'
External table is not in the expected format.
Perchè????