SunQuest
           Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb Site ManagementScripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old March 2nd, 2004, 09:52 AM
prajeesh prajeesh is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Bangalore, India
Posts: 2 prajeesh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Create Excel Object via vb script in a Network Folder

Hi,
I am using Vb Script in HTML to read an xml file and upload the same to Excel in a formatted manner. The problem i am encountering is in the CreateObject("Excel.Application")
command.

When i save the Html File and the xml file to my local drive and then open the html and click on the button to download..the Excel Application is getting opened.
But if i save both the files to a folder on my network(mappped as Z: Drive)..then the CreateObject is not working. Can someone help me on this...

The code is as follows:

<SCRIPT LANGUAGE="VBScript">
' Declare the Constants
Const xlNormalView = 1
......
' Declare the work variables
Dim retVal
Dim FsWkTxt........

Sub Download2Excel
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
xlApp.Workbooks.Add
xlApp.ScreenUpdating = False
DateMsg = "Generated on - " + FormatDateTime(Now(), 0)
' Load the xml file
strFileName = "Stock Report.xml"
Set oDoc = CreateObject("MSXML2.DOMDocument")
oDoc.async = False
oDoc.validateOnParse = True
oDoc.Load strFileName

If oDoc.parseError.errorCode = 0 Then
R = 0
C = 0

For Each ANode In oDoc.childNodes 'For each ROOT
If ANode.hasChildNodes Then
xlApp.ActiveCell.Offset(R, C).Value = ANode.NodeTypedValue
xlApp.ActiveCell.Offset(R, C).Font.Bold = True
xlApp.ActiveCell.Offset(R, C).Font.Size = 11
R = R + 1
End If....
Next
End If....
.........
........
End Sub

Thanks in Advance,
Prajeesh Krishnan

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb Site ManagementScripts > Create Excel Object via vb script in a Network Folder


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway