devo esportare dei record su un foglio execel
usando un codice di questo tipo:
il problema è che se utilizzo solo i primi due campi tutto è okcodice:act.WriteLine "<html xmlns:x=""urn:schemas-microsoft-com:office:excel"">" act.WriteLine "<head>" act.WriteLine "<!--[if gte mso 9]><xml>" act.WriteLine "<x:ExcelWorkbook>" act.WriteLine "<x:ExcelWorksheets>" act.WriteLine "<x:ExcelWorksheet>" act.WriteLine "<x:Name>"& u_title &"</x:Name>" act.WriteLine "<x:WorksheetOptions>" act.WriteLine "<x:Print>" act.WriteLine "<x:ValidPrinterInfo/>" act.WriteLine "</x:Print>" act.WriteLine "</x:WorksheetOptions>" act.WriteLine "</x:ExcelWorksheet>" act.WriteLine "</x:ExcelWorksheets>" act.WriteLine "</x:ExcelWorkbook>" act.WriteLine "</xml>" act.WriteLine "<![endif]--> " act.WriteLine "</head>" act.WriteLine "<body>" DO while not rs.EOF u_cell1=rs("codicecli") u_cell2=rs("email") if rs("piva")="" then u_cell3="dato non presente" else u_cell3=rs("piva") end if act.WriteLine "<table>" act.WriteLine "<tr>" act.WriteLine "<td>" act.WriteLine u_cell1 act.WriteLine "</td>" act.WriteLine "<td>" act.WriteLine u_cell2 act.WriteLine "</td>" act.WriteLine "<td>" act.WriteLine u_cell3 act.WriteLine "</td>"....
se inserisco il terzo u_cell3 ottengo questo codice di errore
perchè?codice:Type mismatch: 'act.WriteLine'
come posso prevenire la cosa?

Rispondi quotando