There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Software Development
Tag Cloud
audio blue screen boot bsod computer cpu crash dell desktop driver drivers error excel external hard drive firefox freezes freezing hard drive hardware hijackthis internet internet explorer itunes laptop malware monitor motherboard mouse network networking outlook 2007 power printer problem ram router screen slow sound spyware trojan usb virus vista vista 32-bit windows windows xp windowsxp winxp wireless
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
data reading and writng from/to excel using VBScript


Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
coool_03's Avatar
Junior Member with 7 posts.
 
Join Date: Dec 2004
Experience: Advanced
31-Mar-2005, 08:35 PM #1
data reading and writng from/to excel using VBScript
hi, if I dont have Excel on my computer..can I still access xls files/data from other computer on netwrk where excel is installed. I have the VBScript code whic are running on systems where execl is installed...I want codes in VBScript which I can use to read/write/edit exls ffiles on a network...please help with the example code ..thanks you for all ur time. coool_03@yahoo.com
Gibbs's Avatar
Senior Member with 638 posts.
 
Join Date: Feb 2005
Location: England
Experience: Intermediate
05-Apr-2005, 06:32 AM #2
Never used VBScript but this looks handy:

Code:
<Script language="vbscript">

Dim objexcel

Set objExcel = server.createobject("Excel.application")

objexcel.Visible = True

objexcel.Workbooks.add

objexcel.Cells(1, 1).Value = "Testing"

objexcel.ActiveWorkbook.SaveAs("c:\exceltest.xls")
objexcel.Quit

</SCRIPT>
coool_03's Avatar
Junior Member with 7 posts.
 
Join Date: Dec 2004
Experience: Advanced
06-Apr-2005, 08:23 AM #3
Quote:
Originally Posted by Gibbs
Never used VBScript but this looks handy:

Code:
<Script language="vbscript">

Dim objexcel

Set objExcel = server.createobject("Excel.application")

objexcel.Visible = True

objexcel.Workbooks.add

objexcel.Cells(1, 1).Value = "Testing"

objexcel.ActiveWorkbook.SaveAs("c:\exceltest.xls")
objexcel.Quit

</SCRIPT>
thank you for the code, Gibbs!!. However, I have the above code you have provided and have been using it. The above code works good only when MSExcel is installed on the computer.

Let me put my question once again. I want to use this code on a network. There are some computer which does not have Excell on it. If I use the above code, the error says "Cannot create Excel.Application object" because Excel is not installed on the computer. The above code seems to be ASP code...I cannot use ASP ...

I think I should use Connection objects, Recordset...please help.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 10:19 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.