473,586 Members | 2,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inventory in ASP

Hi,

I m new to ASP. I have written a script to take inventory of PCs on my
network in an excel spreadsheet. I want it to be available whenever
wherever needed by my managers and other accounts/purchase people. Is
there any way possible that I can put it on my intranet website using
ASP...????

Thanx in advance....

Jaydeep.

Script Code goes here.
'---------------------------------------------------------------------------------------------------------
Set objExcel = CreateObject("E xcel.Applicatio n")
objExcel.Visibl e = True
objExcel.Workbo oks.Add
x = 1
For i = 1 To 15
objExcel.Cells( x, i).Font.Bold = True
Next
objExcel.Cells( 1, 1).Value = "Machine Name"
objExcel.Cells( 1, 2).Value = "# of Procs"
objExcel.Cells( 1, 3).Value = "Proc Type"
objExcel.Cells( 1, 4).Value = "Max Clock Speed"
objExcel.Cells( 1, 5).Value = "Tot Phy Mem"
objExcel.Cells( 1, 6).Value = "Free Phy Mem"
objExcel.Cells( 1, 7).Value = "Tot Virtual Mem"
objExcel.Cells( 1, 8).Value = "Free Virtual Mem"
objExcel.Cells( 1, 9).Value = "Tot Visible Mem"
objExcel.Cells( 1, 10).Value = "Manufactur er"
objExcel.Cells( 1, 11).Value = "Model"
objExcel.Cells( 1, 12).Value = "OS Serial Number"
objExcel.Cells( 1, 13).Value = "Machine Serial Number"
objExcel.Cells( 1, 14).Value = "Free Space"
objExcel.Cells( 1, 15).Value = "File System"
objExcel.Cells( 1, 16).Value = "Device ID"
''''''''''''''' '''
x = 2
strComputers = InputBox _
("What computer would you like info on?", _
"Inventory. ", strLocalCompute r)
On Error Resume Next
Set objNetwork = CreateObject("W script.Network" )
strLocalCompute r = objNetwork.Comp uterName
If strComputers = "" Then
WScript.Quit
End If
'''''''
arrComputers = Split(strComput ers, " ")
For Each strComputer In arrComputers
objExcel.Cells( x, 1).Value = strComputer
x = x + 1
y = x - 1
''''''''''''''
Set objWMIService = GetObject("winm gmts:\\" & strComputer &
"\root\CIMV 2")
Set colCSes = objWMIService.E xecQuery("SELEC T * FROM
Win32_ComputerS ystem")
For Each objCS In colCSes
objExcel.Cells( y, 2).Value = objCS.NumberOfP rocessors
Next
Set colProcessors = objWMIService.E xecQuery("Selec t * from
Win32_Processor ")
For Each objProcessor In colProcessors
objExcel.Cells( y, 3).Value = objProcessor.Na me
objExcel.Cells( y, 4).Value = objProcessor.Ma xClockSpeed
Next
Set objWMIService = GetObject("winm gmts:\\" & strComputer &
"\root\CIMV 2")
Set colCSItems = objWMIService.E xecQuery("SELEC T * FROM
Win32_ComputerS ystem")
For Each objCSItem In colCSItems
objExcel.Cells( y, 5).Value = objCSItem.Total PhysicalMemory
Next
Set colOSItems = objWMIService.E xecQuery("SELEC T * FROM
Win32_Operating System")
For Each objOSItem In colOSItems
objExcel.Cells( y, 6).Value = objOSItem.FreeP hysicalMemory
objExcel.Cells( y, 7).Value = objOSItem.Total VirtualMemorySi ze
objExcel.Cells( y, 8).Value = objOSItem.FreeV irtualMemory
objExcel.Cells( y, 9).Value = objOSItem.Total VisibleMemorySi ze
Next
Set objWMIService = GetObject("winm gmts:\\" & strComputer &
"\root\CIMV 2")
Set colItems = objWMIService.E xecQuery("SELEC T * FROM
Win32_ComputerS ystem")
For Each objItem In colItems
objExcel.Cells( y, 10).Value = objItem.Manufac turer
objExcel.Cells( y, 11).Value = objItem.Model
Next
Set colOperatingSys tems = objWMIService.E xecQuery("Selec t * from
Win32_Operating System")
For Each objOperatingSys tem In colOperatingSys tems
objExcel.Cells( y, 12).Value = objOperatingSys tem.SerialNumbe r
Next
Set colItems = objWMIService.E xecQuery("SELEC T * FROM Win32_BIOS")
For Each objItem In colItems
objExcel.Cells( y, 13).Value = objItem.SerialN umber
Next

Const CONVERSION_FACT OR = 1048576
Set colItems = objWMIService.I nstancesOf("SEL ECT * FROM
Win32_LogicalDi sk")
For Each objItem In colItems
FreeMegaBytes = objItem.FreeSpa ce / CONVERSION_FACT OR
objExcel.Cells( y, 14).Value = objItem.FreeMeg aBytes
objExcel.Cells( y, 15).Value = objItem.FileSys tem
objExcel.Cells( y, 16).Value = objItem.DeviceI D
Next

Jan 21 '06 #1
2 3560
"jay_kbvt" <ja************ *@gmail.com> wrote in message
news:11******** *************@g 44g2000cwa.goog legroups.com...
Hi,

I m new to ASP. I have written a script to take inventory of PCs on my
network in an excel spreadsheet. I want it to be available whenever
wherever needed by my managers and other accounts/purchase people. Is
there any way possible that I can put it on my intranet website using
ASP...????


[snip]

File + Save As (Save as type = Web page)
Jan 21 '06 #2
I'd suggest putting the data into an Access database and perhaps look
at some of the database examples at www.asp101.com/samples

But in more direct answer to your question:

Using Excel Spreadsheets as Web Data Sources by Steven Raines -
11/23/1999
http://www.algonquinstudios.com/Home...WebDataSources

Extract data from Excel Spreadsheet using ASP by Nabeel Akhtar -
9/25/2005
http://www.geekpedia.com/tutorial143...using-ASP.html

VBScript and Excel
http://www.greggriffiths.org/webdev/both/excel/

Best regards,
-Paul
www.Bullschmidt.com - Freelance Web and Database Developer
www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips

Jan 23 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3420
by: gregork | last post by:
I have painstakingly created an excel 2000 workbook for the very complex recipes I have to formulate. I have 2 sheets- 1 for configuring the recipe and 1 that is like an inventory of all the raw materials and their specifications. I have many lookup formulas on sheet1 that lookup the specs on the inventory. The problem is sheet 1 works...
2
2160
by: Stella Pieters via AccessMonster.com | last post by:
Let me start by saying that I'm a newbie in VBA. I've created an application in access where the user enters the quantity of the items sold in a form. I would like to have these records created in a table, mentioning the qty sold, the transaction date etc. this table I'm planning to use afterward to calculate the quantity on hand. I have...
13
3973
by: royaltiger | last post by:
I am trying to copy the inventory database in Building Access Applications by John L Viescas but when i try to run the database i get an error in the orders form when i click on the allocate button "Unexpected Error":3251 operation is not supported for this type of object.The demo cd has two databases, one is called inventory and the other...
109
25752
by: zaidalin79 | last post by:
I have a java class that goes for another week or so, and I am going to fail if I can't figure out this simple program. I can't get anything to compile to at least get a few points... Here are the assignments... 4. CheckPoint: Inventory Program Part 1 • Resource: Java: How to Program • Due Date: Day 5 forum • Choose a product that lends...
0
7103
by: south622 | last post by:
I'm taking a beginning Java course and I'm stuck in week eight of a nine week course. If anyone could help me I would greatly appreciate it. This assignment was due yesterday and each day I go past the due date 10% of the grade is taken off. I think I'm coming down with the flu and my brain is just not processing this assignment. Here is the...
9
7600
by: xxplod | last post by:
I am suppose to modify the Inventory Program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In...
3
6982
by: cblank | last post by:
I need some help if someone could help me. I know everyone is asking for help in java. But for some reason I'm the same as everyone else when it comes to programming in java. I have an inventory program that I have built so far with no problem. But I cannot figure out how to turn it into a GUI application. This is what I'm trying to get it to do....
2
2509
by: pinkf24 | last post by:
I cannot figure out how to add the following: Modify the Inventory Program to include an Add button, a Delete button, and a Modify button on the GUI. These buttons should allow the user to perform the corresponding actions on the item name, the number of units in stock, and the price of each unit. An item added to the inventory should have an...
1
2656
by: jcato77 | last post by:
I need help with a class project I'm working on, Below is my assignment and the code I have currently created. Assignment: Modify the Inventory Program by creating a subclass of the product class that uses one additional unique feature of the product you chose (for the DVDs subclass, you could use movie title, for example). In the subclass,...
3
4468
by: 100grand | last post by:
Modify the Inventory Program to use a GUI. The GUI should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the GUI should display the value of the entire inventory, the additional...
0
7912
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8202
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3837
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3865
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1449
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.