salve a tutti, ho questo problema:
vorrei potermi posizionare su una determinata cella excel tramite il seguente codice:
Ecco a questo punto io vorrei poter indicare che la cella in cui andare a posizionare il primo elemento del record RsMese3, per esempio la cella K2.codice:Set RsMese2 = Server.CreateObject("ADODB.Recordset") RsMese2 .ActiveConnection = strConn RsMese2 .Source = "SELECT DISTINCT(Data_Ope) as Giorno, Data_Ope FROM T_PrimaNota"&Anno&" where datepart('m',Data_Ope)=1 order by Data_ope" RsMese2 .CursorType = 0 RsMese2 .CursorLocation = 3 RsMese2 .LockType = 3 RsMese2 .Open() Set RsMese3 = Server.CreateObject("ADODB.Recordset") RsMese3.ActiveConnection = strConn RsMese3.Source = "SELECT DISTINCT(Data_Ope) as Giorno, Data_Ope FROM T_PrimaNota"&Anno&" where datepart('m',Data_Ope)=2 order by Data_ope" RsMese3.CursorType = 0 RsMese3.CursorLocation = 3 RsMese3.LockType = 3 RsMese3.Open() Set fso = Server.CreateObject("Scripting.FileSystemObject") path="PrimaNota" Set act = fso.CreateTextFile(server.mappath("/public/"& path & "_"&day(date())&"-"&month(date())&"-"& year(date())&".xls"), true) act.WriteLine "<html xmlns:x=""urn:schemas-microsoft-comffice:excel"">" act.WriteLine "<head>" act.WriteLine "<x:ExcelWorkbook>" act.WriteLine "<x:ExcelWorksheets>" act.WriteLine "<x:ExcelWorksheet>" 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 "</head>" act.WriteLine "<body>" act.WriteLine "<table border=1>" act.WriteLine "<tr>" act.WriteLine "<td colspan=""18"" align=""center"" bgcolor=""#f570ea"">" act.WriteLine "FEBBRAIO" act.WriteLine "</td>" act.WriteLine "<td colspan=""18"" align=""center"" bgcolor=""#3cc6f3"">" act.WriteLine "MARZO" act.WriteLine "</td>" act.WriteLine "</tr>" act.WriteLine "<tr>" act.WriteLine "<td>" act.WriteLine "DATA" act.WriteLine "</td>" act.WriteLine "<td bgcolor=""#73e564"">" act.WriteLine "VALORI FEB" act.WriteLine "</td>" act.WriteLine "<td>" act.WriteLine "DATA" act.WriteLine "</td>" act.WriteLine "<td bgcolor=""#73e564"">" act.WriteLine "VALORI MARZO" act.WriteLine "</td>" act.WriteLine "</tr>" while not RsMese2.eof act.WriteLine "<td>" act.WriteLine RsMese2("Giorno") act.WriteLine "</td>" act.WriteLine "<td>" act.WriteLine RsMese2("ValoreDaTabella") act.WriteLine "</td>" RsMese2.movenext wend
Spero di essere stato chiaro e grazie a chi mi vorrà aiutare

Rispondi quotando
