Jump to content
Fórum Script Brasil
  • 0

FSO


marvi

Question

Ola,

Estou tentando abrir um arquivo em Word, Excel, PowerPoint...Mas esse código não abre, nesse exemplo tem um txt, mas não quero txt e sim .doc .xls e PowerPoint, tem como?

if nome <> "" then

  Const fsoLeitura = 1
  Dim objFSO
  'Instanciar o objeto FSO
  Set objFSO = Server.CreateObject("Scripting.FileSystemObject")  

  'Abrir o arquivo texto
  Dim objTextStream
  Set objTextStream = objFSO.OpenTextFile("C:\SiteJose\exemplo.txt", fsoLeitura)

  'Visualiza  no navegador o conteúdo do arquivo texto
101:  Response.Write objTextStream.ReadAll
end if

E outro esse da o seguinte erro também:

Final do arquivo ultrapassado

/sitejose/adm.asp, line 101

Obrigado!

Marcelo

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152k
    • Total Posts
      651.6k
×
×
  • Create New...