Jump to content

ASP with excel

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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...