If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Adabas > Excel validation in ASP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-27-03, 04:35
k_santu k_santu is offline
Registered User
 
Join Date: Feb 2003
Posts: 2
Post Excel validation in ASP

I am using following code to validate excel,actually this code is working VB but in ASP its giving Error what could be the problem

Dim objXL ,objWkBook

Set objXL = CreateObject("EXCEL.application")
' objXL.Application.Visible = True
Set objWkBook = objXL.Workbooks.Add
objXL.Range("A2").Validation.Add Type:=xlValidateDecimal, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="0.1", Formula2:="5"
objXL.Range("A3").Validation.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlValidAlertStop, Formula1:="1,1,1,1"

objXL.ActiveWorkbook.SaveAs "C:\Test1.xls"
objXL.Quit
Set objXL = Nothing

So I am getting error like

COM Error Number :-2146827286 (0x800A03EA)
Error Source bjXL.Range("A2").Validation.Add Type:=xlValidateDecimal, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="0.1", Formula2:="5"
File Name :/excel.asp
Line Number :26
Brief Description: Syntax error



and also how to validate Excel using this excel object

Set objSpreadsheet= Server.CreateObject("OWC.Spreadsheet")


Thanx
Kaithi
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On