Error: Saveas method of workbook class

17/10/2005 - 16:28 por rickpt | Informe spam
Hola

Estoi intentando grabar un fichero xls como htm. Para eso estoy usando la siguiente scrip

<SCRIPT LANGUAGE="VBScript"
Function CreateExcel(
Dim sTemplat
Dim xlAp
Dim xlBoo
Dim xlShee
Set xlApp = CreateObject("Excel.Application"
xlApp.DisplayAlerts = Fals
sTemplate = "http://localhost/easyDoc/TrackingDocStatus.xls
xlApp.DisplayAlerts = Fals
xlApp.Workbooks.Open sTemplat
Set xlBook = xlApp.Workbooks(1
Set xlSheet = xlBook.Sheets("Per Status"
xlSheet.Cells(1,2)="Process Description
xlSheet.Cells(1,3)="Process Instruction
xlSheet.Cells(1,4)="Technical Specification
xlSheet.Cells(1,5)="Template
xlSheet.Cells(1,6)="External Document
xlSheet.Cells(2,1)="Being Created
xlSheet.Cells(3,1)="Being Reviewed
xlSheet.Cells(4,1)="Being Approved
xlSheet.Cells(5,1)="Waiting Release
xlSheet.Cells(6,1)="16
xlSheet.Cells(7,1)="4
xlSheet.Cells(8,1)="11
xlSheet.Cells(9,1)="0
xlSheet.Cells(2,2)="94
xlSheet.Cells(3,2)="17
xlSheet.Cells(4,2)="10
xlSheet.Cells(5,2)="0
xlSheet.Cells(2,3)="10
xlSheet.Cells(3,3)="6
xlSheet.Cells(4,3)="37
xlSheet.Cells(5,3)="2
xlSheet.Cells(2,4)="13
xlSheet.Cells(3,4)="3
xlSheet.Cells(4,4)="4
xlSheet.Cells(5,4)="0
xlSheet.Cells(2,5)="0
xlSheet.Cells(3,5)="0
xlSheet.Cells(4,5)="0
xlSheet.Cells(5,5)="0

xlApp.DisplayAlerts = False
xlBook.SaveAs ("http://localhost/easyDoc/TrackingDo....htm")
xlApp.Visible = tru
Set xlSheet = Nothin
Set xlSheet2 = Nothin
Set xlBook = Nothin
Set xlApp = Nothin
end functio
</SCRIPT

Pero me devulve siempre el error "Error: Saveas method of workbook class ". Alguien pude ayudar. Gracia

rickpt

Ver este tema: http://www.softwaremix.net/viewtopic-444173.htm

Enviado desde http://www.softwaremix.net
 

Leer las respuestas

#1 Matías Iacono
17/10/2005 - 22:12 | Informe spam
Posiblemente el error se debe a que tienes que pasarle una direccion fisica,
no virtual.

O sea, un c:\

Saludos.

Matías Iacono
Microsoft MVP ASP/ASP.net - DCE3
"rickpt" escribió en el mensaje
news:

Hola,

Estoi intentando grabar un fichero xls como htm. Para eso estoy usando la
siguiente script

<SCRIPT LANGUAGE="VBScript">
Function CreateExcel()
Dim sTemplate
Dim xlApp
Dim xlBook
Dim xlSheet
Set xlApp = CreateObject("Excel.Application")
xlApp.DisplayAlerts = False
sTemplate = "http://localhost/easyDoc/TrackingDo....xls"
xlApp.DisplayAlerts = False
xlApp.Workbooks.Open sTemplate
Set xlBook = xlApp.Workbooks(1)
Set xlSheet = xlBook.Sheets("Per Status")
xlSheet.Cells(1,2)="Process Description"
xlSheet.Cells(1,3)="Process Instruction"
xlSheet.Cells(1,4)="Technical Specification"
xlSheet.Cells(1,5)="Template"
xlSheet.Cells(1,6)="External Document"
xlSheet.Cells(2,1)="Being Created"
xlSheet.Cells(3,1)="Being Reviewed"
xlSheet.Cells(4,1)="Being Approved"
xlSheet.Cells(5,1)="Waiting Release"
xlSheet.Cells(6,1)="16"
xlSheet.Cells(7,1)="4"
xlSheet.Cells(8,1)="11"
xlSheet.Cells(9,1)="0"
xlSheet.Cells(2,2)="94"
xlSheet.Cells(3,2)="17"
xlSheet.Cells(4,2)="10"
xlSheet.Cells(5,2)="0"
xlSheet.Cells(2,3)="10"
xlSheet.Cells(3,3)="6"
xlSheet.Cells(4,3)="37"
xlSheet.Cells(5,3)="2"
xlSheet.Cells(2,4)="13"
xlSheet.Cells(3,4)="3"
xlSheet.Cells(4,4)="4"
xlSheet.Cells(5,4)="0"
xlSheet.Cells(2,5)="0"
xlSheet.Cells(3,5)="0"
xlSheet.Cells(4,5)="0"
xlSheet.Cells(5,5)="0"

xlApp.DisplayAlerts = False
xlBook.SaveAs ("http://localhost/easyDoc/TrackingDo....htm")
xlApp.Visible = true
Set xlSheet = Nothing
Set xlSheet2 = Nothing
Set xlBook = Nothing
Set xlApp = Nothing
end function
</SCRIPT>

Pero me devulve siempre el error "Error: Saveas method of workbook class
". Alguien pude ayudar. Gracias


rickpt


Ver este tema: http://www.softwaremix.net/viewtopic-444173.html

Enviado desde http://www.softwaremix.net


Preguntas similares