Jump to content

ASP with excel


berdu

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...