berdu Posted January 9, 2013 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. Link to comment Share on other sites More sharing options...
justsomeguy Posted January 9, 2013 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now