berdu 0 Posted January 9, 2013 Report Share Posted January 9, 2013 Hello all, I need some help. I have some variants which i get from my Database. (access or SQL) Until here all ok.But i need to send some variants to a excel file. But i need to send those values to exact cells there. I've tryed and searched some info on the web but cudn found a clean and simple sample syntax + code. I connect problemless to my excel file : Set cn = Server.CreateObject("ADODB.Connection")cn.Open "DBQ=" & Server.MapPath("exceldb.xls") & ";" & _"DRIVER={Microsoft Excel Driver (*.xls)};" then i try to use "insert", like ; SQL = "INSERT INTO Sheet1 (A1:A1) VALUES (SampleValue)"set rs = cn.execute(SQL) Above the syntax doesnt work. How should it be correct ? or also by reading from a cell like; SQL = "SELECT * FROM A1:A1" <------ this doenst work of course...set rs = cn.execute(SQL) %> Thank you in advance for tips & Help. Quote Link to post Share on other sites
justsomeguy 1,135 Posted January 9, 2013 Report Share Posted January 9, 2013 There's information here about how to refer to cells in a particular sheet: http://support.microsoft.com/kb/257819 Also check here: http://www.xtremevbtalk.com/showthread.php?t=217783 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.