RICK wrote:
> How can one assign a variable value to a cell. The following doesn't
> work.
>
>
> .......
> strabc = rsTemp.Fields("Taxonomy")
> %>
>
> Dim Xcl
>
>
> Set Xcl = CreateObject("Excel.Application")
> Xcl.Visible = true
> Set newBook = Xcl.Workbooks.Add
> newBook.Worksheets(1).Cells(1,1).value=strabc
> </script> strabc is a server-side variable, quite out of scope to this client-side
code. What you would have to do is response.write the value contained by
strabc, like this:
newBook.Worksheets(1).Cells(1,1).value="<%=strabc%>"
You will probably want to ensure that any double-quotes in the string
are escaped in your server-side code:
strabc = replace(rsTemp.Fields("Taxonomy"),"""","""""")
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.