Workbooks.open no funciona
Buenas.
Adjunto el código siguiente que tiene el fallo de que cuando intenta leer el fichero, se queda colgado indefinidamente.
He probado a poner la ruta sin usar la variable Server.MapPath, etc..., pero no hay manera
'On error resume next
dim mySmartUpload
Dim intCount
const NFilas = 21
const NCols = 10
dim tabla(21, 17)
const MaxSheet = 3
Server.ScriptTimeOut = 3600
' Object creation
' ***************
'Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
'mySmartUpload.Upload
'Ruta donde se va a guardar el fichero excel.
'intCount = mySmartUpload.Save(Server.MapPath("./Temp/"))
For each file In mySmartUpload.files
if len(file.Filename) > 0 then
fichero = file.filename
end if
next
'***************************************
' Veamos si podemos abrir y cerrar un objeto Excel
'***************************************
Dim objExcel
Dim objWorkBook
Set objExcel = CreateObject("EXCEL.APPLICATION")
'LO SIGUIENTE HACE QUE LA PAGINA SE QUEDE ESTANCADA INDEFINIDAMENTE
Set objWorkBook = objExcel.Workbooks.Open(Server.MapPath("./Temp") + "
Adjunto el código siguiente que tiene el fallo de que cuando intenta leer el fichero, se queda colgado indefinidamente.
He probado a poner la ruta sin usar la variable Server.MapPath, etc..., pero no hay manera
'On error resume next
dim mySmartUpload
Dim intCount
const NFilas = 21
const NCols = 10
dim tabla(21, 17)
const MaxSheet = 3
Server.ScriptTimeOut = 3600
' Object creation
' ***************
'Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
'mySmartUpload.Upload
'Ruta donde se va a guardar el fichero excel.
'intCount = mySmartUpload.Save(Server.MapPath("./Temp/"))
For each file In mySmartUpload.files
if len(file.Filename) > 0 then
fichero = file.filename
end if
next
'***************************************
' Veamos si podemos abrir y cerrar un objeto Excel
'***************************************
Dim objExcel
Dim objWorkBook
Set objExcel = CreateObject("EXCEL.APPLICATION")
'LO SIGUIENTE HACE QUE LA PAGINA SE QUEDE ESTANCADA INDEFINIDAMENTE
Set objWorkBook = objExcel.Workbooks.Open(Server.MapPath("./Temp") + "