Ho scritto in asp il codice per esportare i dati da un file mdb ad un file excel. Ho però un problema se supero le 1900 righe (circa) non mi fa l'esportazione. mi dice file non trovato...
non ne esco... mi date una mano?Nessuna pagina web trovata per l'indirizzo web:
xls_export.asp?sql=COGNOME%20like%20'*'&ord=%20ord er%20by%20COGNOME%20asc Errore 6 (net::ERR_FILE_NOT_FOUND): Impossibile trovare il file o la directory.
![]()
![]()
codice:<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Session.TimeOut = 60 %> <%if session("id_member") <> "" then%> <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=windows-1252"> <meta name=ProgId content=Excel.Sheet> <meta name=Generator content="Microsoft Excel 11"> <link rel=File-List href="Cartel2_file/filelist.xml"> <link rel=Edit-Time-Data href="Cartel2_file/editdata.mso"> <link rel=OLE-Object-Data href="Cartel2_file/oledata.mso"> <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>eval</o:Author> <o:LastAuthor>eval</o:LastAuthor> <o:Created>2011-12-21T16:39:52Z</o:Created> <o:LastSaved>2011-12-21T16:42:01Z</o:LastSaved> <o:Company>copy</o:Company> <o:Version>11.9999</o:Version> </o:DocumentProperties> </xml><![endif]--> <style> <!--table {mso-displayed-decimal-separator:"\,"; mso-displayed-thousand-separator:"\.";} @page {margin:.98in .79in .98in .79in; mso-header-margin:.5in; mso-footer-margin:.5in;} tr {mso-height-source:auto;} col {mso-width-source:auto;} br {mso-data-placement:same-cell;} .style0 {mso-number-format:General; text-align:general; vertical-align:bottom; white-space:nowrap; mso-rotate:0; mso-background-source:auto; mso-pattern:auto; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Arial; mso-generic-font-family:auto; mso-font-charset:0; border:none; mso-protection:locked visible; mso-style-name:Normale; mso-style-id:0;} td {mso-style-parent:style0; padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Arial; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;} .xl24 {mso-style-parent:style0; mso-number-format:"\@";} .xl25 {mso-style-parent:style0; mso-number-format:"Short Date";} .xl26 {mso-style-parent:style0; mso-number-format:"\0022€\0022\\ \#\,\#\#0\.00\;\[Red\]\\-\0022€\0022\\ \#\,\#\#0\.00";} --> </style> <!--[if gte mso 9]><xml> <x:ExcelWorkbook> <x:ExcelWorksheets> <x:ExcelWorksheet> <x:Name>Lunimedica</x:Name> <x:WorksheetOptions> <x:Selected/> <x:FreezePanes/> <x:FrozenNoSplit/> <x:SplitHorizontal>1</x:SplitHorizontal> <x:TopRowBottomPane>1</x:TopRowBottomPane> <x:SplitVertical>3</x:SplitVertical> <x:LeftColumnRightPane>3</x:LeftColumnRightPane> <x:ActivePane>0</x:ActivePane> <x:Panes> <x:Pane> <x:Number>3</x:Number> </x:Pane> <x:Pane> <x:Number>1</x:Number> </x:Pane> <x:Pane> <x:Number>2</x:Number> </x:Pane> <x:Pane> <x:Number>0</x:Number> </x:Pane> </x:Panes> <x:ProtectContents>False</x:ProtectContents> <x:ProtectObjects>False</x:ProtectObjects> <x:ProtectScenarios>False</x:ProtectScenarios> </x:WorksheetOptions> </x:ExcelWorksheet> </x:ExcelWorksheets> <x:WindowHeight>10170</x:WindowHeight> <x:WindowWidth>20700</x:WindowWidth> <x:WindowTopX>600</x:WindowTopX> <x:WindowTopY>315</x:WindowTopY> <x:ProtectStructure>False</x:ProtectStructure> <x:ProtectWindows>False</x:ProtectWindows> </x:ExcelWorkbook> </xml><![endif]--> </head> <body link=blue vlink=purple> <% Strsql = "SELECT * from Anagrafica WHERE "&replace(request.QueryString("sql"),"*","%")& " and cancellato = false " &request.QueryString("Ord") sqlquery = replace(request.QueryString("sql"),"*","%") Strsql = "SELECT * from Anagrafica LEFT JOIN Interventi_clienti ON Anagrafica.Cod_cliente=Interventi_clienti.Codice_cliente " Strsql = Strsql & " WHERE "&replace(sqlquery,"Anagrafica WHERE","")&" and cancellato = false " Strsql = Strsql & " and eliminato = false " Strsql = Strsql & request.QueryString("Ord") Set Clienti = Server.CreateObject ("ADODB.Recordset") Clienti.Open Strsql, DBConn, 3, 3 Response.ContentType = "application/vnd.ms-excel" Response.AddHeader "Content-Disposition", "attachment; filename=filedaesportare.xls" if Clienti.eof <> true then coloreAnagrafica = "bgcolor=""#ffccff""" coloreProvenienza = "bgcolor=""#ff9966""" coloreIndirizzo = "bgcolor=""#b2b2b2""" coloreInterventipari = "bgcolor=""#99ff66""" coloreInterventidispari = "bgcolor=""#33ff66""" ClientePrecedente = -1 numeroInterventiCliente=0 DatiClienti="" NumeroMaxInterventi=0 while not Clienti.eof if Clienti.fields("Cod_cliente")<>ClientePrecedente then if ClientePrecedente <> -1 then DatiClienti = DatiClienti& "</tr></table>" numeroInterventiCliente=0 DatiClienti = DatiClienti& "<table border=""1""><tr><td class=xl25>" & Clienti.fields("data_inserimento") & "</td><td>" & Clienti.fields("NOME") & "</td><td>" & Clienti.fields("COGNOME") & "</td><td class=xl25>" & Clienti.fields("Data_nascita") & "</td><td>" & Clienti.fields("Luogo_nascita") & "</td><td>" & Clienti.fields("Codice_Fiscale") & "</td><td class=xl24>" & Clienti.fields("Telefono") & "</td><td class=xl24>" & Clienti.fields("Cellulare01") & "</td><td class=xl24>" & Clienti.fields("Cellulare02") & "</td><td>" & Clienti.fields("email01") & "</td><td>" & Clienti.fields("email02") & "</td><td>" & Clienti.fields("INDIRIZZO") & "</td><td>"& Clienti.fields("CAP") & "</td><td>"& Clienti.fields("CITTA") & "</td><td>"& Clienti.fields("PROVINCIA") & "</td><td>"& Clienti.fields("REGIONE") & "</td><td>"& Clienti.fields("NAZIONE") & "</td>" DatiClienti = DatiClienti& "<td>" & Clienti.fields("Cliente_Potenziale") & "</td><td>" & Clienti.fields("Provenienza_contatto") & "</td><td>" & Clienti.fields("Provenienza_note") & "</td>" end if numeroInterventiCliente=numeroInterventiCliente+1 DatiClienti = DatiClienti& "<td>" & Clienti.fields("Codice_intervento") & "</td><td>" & Clienti.fields("Descrizione_intervento") & "</td><td>" & Clienti.fields("Materiale_usato") & "</td><td>" & Clienti.fields("Blocconote") & "</td><td>" & Clienti.fields("Medico") & "</td><td>" & Clienti.fields("Centro_medico") & "</td><td class=xl25>"& Clienti.fields("Data_Acconto1") & "</td><td class=xl26>"& Clienti.fields("Acconto1") & "</td><td class=xl25>"& Clienti.fields("Data_Acconto2") & "</td><td class=xl26> "& Clienti.fields("Acconto2") & "</td><td class=xl25>"& Clienti.fields("Data_Saldo") & "</td><td class=xl26> "& Clienti.fields("Saldo") & "</td><td class=xl26>"& Clienti.fields("Importo_totale") & "</td>" if NumeroMaxInterventi<numeroInterventiCliente then NumeroMaxInterventi = numeroInterventiCliente ClientePrecedente = Clienti.fields("Cod_cliente") Clienti.movenext wend DatiClienti = DatiClienti& "</tr></table>" RigaTitoli = "<table border=""1"">" RigaTitoli = RigaTitoli& "<tr><td "&coloreAnagrafica&">Data Inserimento</td><td "&coloreAnagrafica&">NOME</td><td "&coloreAnagrafica&">COGNOME</td><td "&coloreAnagrafica&">Data Nascita</td><td "&coloreAnagrafica&">Luogo Nascita</td><td "&coloreAnagrafica&">Codice Fiscale</td><td "&coloreAnagrafica&">telefono</td><td "&coloreAnagrafica&">cell 1</td><td "&coloreAnagrafica&">cell 2</td><td "&coloreAnagrafica&">email 1</td><td "&coloreAnagrafica&">email 2</td></td><td "&coloreIndirizzo&">INDIRIZZO</td><td "&coloreIndirizzo&">CAP</td><td "&coloreIndirizzo&">CITTA'</td><td "&coloreIndirizzo&">PROVINCIA</td><td "&coloreIndirizzo&">REGIONE</td><td "&coloreIndirizzo&">NAZIONE</td>" RigaTitoli = RigaTitoli& "<td "&coloreProvenienza&">C/P</td><td "&coloreProvenienza&">Provenienza</td><td "&coloreProvenienza&">Note</td>" For i=1 to Cint(NumeroMaxInterventi) If i Mod 2 = 1 Then coloreInterventi = coloreInterventipari else coloreInterventi=coloreInterventidispari end if RigaTitoli = RigaTitoli& "<td "&coloreInterventi&">Codice Intervento"&i&"</td><td "&coloreInterventi&">Intervento"&i&"</td><td "&coloreInterventi&">Materiale usato</td><td "&coloreInterventi&">Note</td><td "&coloreInterventi&">Chirurgo</td><td "&coloreInterventi&">Centro Medico</td>" RigaTitoli = RigaTitoli& "<td "&coloreInterventi&">Data Acconto 1</td><td "&coloreInterventi&">Acconto 1</td><td "&coloreInterventi&">Data acconto 2</td><td "&coloreInterventi&">Acconto 2</td><td "&coloreInterventi&">Data Saldo</td><td "&coloreInterventi&">Saldo</td><td "&coloreInterventi&">Importo totale</td>" Next RigaTitoli = RigaTitoli& "</tr></table>" response.Write(RigaTitoli) response.Write(DatiClienti) else response.write "<table border=""1"">" response.write "<tr><td>dati non trovati</td><td></td></tr>" response.write "<tr><td>istruzione sql = </td><td>"&Strsql&"</td></tr>" response.write "</table>" end if set Clienti=nothing end if Set DBConn = nothing Set clinica2bDBConn = nothing %>

Rispondi quotando