N
Neeraj
Hi,
The following client side vbScript Code to Export to Excel works fine with
Office 2003, but is not working when client machine has upgraded to Office
2007. Any clue ?
<script language="vbscript">
Sub exportbutton_onclick
Dim sHTML, oExcel, oBook
sHTML = document.all.item("DataGrid1").outerhtml
Set oExcel = CreateObject("Excel.Application")
Set oBook = oExcel.Workbooks.Add
oBook.HTMLProject.HTMLProjectItems("Sheet1").Text = sHTML ‘’’’’’’’’
Getting Error at this line
oBook.HTMLProject.RefreshDocument
oExcel.Visible = true
oExcel.UserControl = true
End Sub
</script>
Error that I am getting is :::: “This method or property is no longer
supported in this version of Excel.â€
I am looking forward to generic solution which work fine with both office
2003 and 2007.
Any Suggestion is welcome?
The following client side vbScript Code to Export to Excel works fine with
Office 2003, but is not working when client machine has upgraded to Office
2007. Any clue ?
<script language="vbscript">
Sub exportbutton_onclick
Dim sHTML, oExcel, oBook
sHTML = document.all.item("DataGrid1").outerhtml
Set oExcel = CreateObject("Excel.Application")
Set oBook = oExcel.Workbooks.Add
oBook.HTMLProject.HTMLProjectItems("Sheet1").Text = sHTML ‘’’’’’’’’
Getting Error at this line
oBook.HTMLProject.RefreshDocument
oExcel.Visible = true
oExcel.UserControl = true
End Sub
</script>
Error that I am getting is :::: “This method or property is no longer
supported in this version of Excel.â€
I am looking forward to generic solution which work fine with both office
2003 and 2007.
Any Suggestion is welcome?