<% ' Create encoder object Dim enc = CreateObject("Scripting.Encoder") 'Wrap the HTML and XML data needed to render Pivot table in a document.write and store it in a string Dim strScript = "document.write("" "")" 'Encode it using EncodeScriptFile method Dim strEncoded = enc.EncodeScriptFile(".js", strScript, 0, "js") %>