Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Set fso = CreateObject("Scripting.FileSystemObject")
FileLoc = "c:\path\to\file.xls"
'Check to see if Excel is already open
If fso.FileExists(FileLoc) Then
On Error Resume Next
Set oExcel = GetObject(, "Excel.Application")
If Err.Number <> 0 Then
Err.Clear
Set oExcel = CreateObject("Excel.Application")
End If
Else
strErr = FileLoc & " could not be found."
MsgBox (strErr), vbCritical, "Error: File Not Found"
Exit Function
End If
Set oWrkBook = oExcel.Workbooks.Open (FileLoc)
oExcel.Worksheets("Sheet 1").Cells(1, 1).Value = var1
oExcel.Worksheets("Sheet 1").Cells(1, 2).Value = var2
oExcel.Worksheets("Sheet 1").Cells(1, 3).Value = var3
oExcel.Worksheets("Sheet 1").Cells(1, 4).Value = var4
oExcel.Worksheets("Sheet 1").Cells(1, 5).Value = var5
oExcel.Worksheets("Sheet 1").Cells(1, 6).Value = var6
oWrkBook.Save
oWrkBook.Close
oExcel.Visible = True
Set oWrkBook = Nothing
Set oExcel = Nothing
Set fso = Nothing
Set username = Item.GetItem.ModifiedFormPages("THEPAGE").Controls("THEFIELD")
'Make sure that 'Sheet 1' is where you want everything
'to go, and make sure you're pointing to the right excel
'file...
oExcel.Worksheets("Sheet 1").Cells(1, 6).Value = username
For n = 1 to rows
val = Ucase( trim( Actv.Cells(n,1).Value ) )
if val = var1 then
'Add data to Excel spreadsheet