Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default I need help to make a viewer files EXCEL

Hi, I am developing a viewer excel files with visual studio 2005 but I
presents a problem: the program does not work well until excel return to
close my application. One suggestion was that I got to use this importation
"Imports Microsoft.Office.Interop" but my visual studio does not recognize
it, which I do?
This is my original code:

Public Class Form1
Dim file As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

buscarArchivo()
End Sub

Public Sub buscarArchivo()
Dim oExcel As Microsoft.Office.Interop.Excel.Application
Dim op As New OpenFileDialog
op.Filter = "Archivos de Imagenes *.xls|*.xls|Imágenes tipo
*.xls|*.xls"
file = ""
If op.ShowDialog = Windows.Forms.DialogResult.OK Then
file = op.FileName
WebBrowser1.Navigate(file)
End If
End Sub

End Class


And this is the suggestion that I gave, but still does not work for me
because I can not make reference to certain commands:
Dim objExcel As New Excel.Application
Dim wbExcel As Excel.Workbook
file = "C:MiArchivo.xls"
objExcel = New Excel.Application
wbCupon = objExcel.Workbooks.Open(file)
objExcel.Visible = True

Perhaps I can help you please!

atte.
zynid3as
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
Here I was trying to almost like a code, but now no longer open files within
the webBrowser but callers to the implementation of MS Excel to open it. I am
working with the version of MS Office Excel 2007. :

Public Sub buscarArchivo()
Dim op As New OpenFileDialog
Dim objExcel As New Excel.Application
Dim wbExcel As Excel.Workbook
With op
.Filter = "Office Documents " & _
"(*.doc, *.xls, *.ppt)|*.doc;*.xls;*.ppt"
.FilterIndex = 1
End With
If op.ShowDialog = Windows.Forms.DialogResult.OK Then
file = op.FileName
oDocument = Nothing

wbExcel = objExcel.Workbooks.Open(file)
objExcel.Visible = True
End If
End Sub

------------------------------------------------------------------------------------------------
zynid3as
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Excel Viewer cannot open files of this type (xlsx) [email protected] Setting up and Configuration of Excel 3 April 22nd 23 09:01 PM
opening xls files associated to excel viewer in ie ravips99 Excel Discussion (Misc queries) 1 June 16th 06 10:08 AM
Can the Excel Viewer read .xls files Whiteowl047 Excel Discussion (Misc queries) 1 April 5th 06 09:04 PM
How open old .wks files without software? Excel viewer no work Hdwman Setting up and Configuration of Excel 1 August 11th 05 02:48 AM
can cvs files be opened using excel viewer darriel Excel Discussion (Misc queries) 1 May 31st 05 04:15 PM


All times are GMT +1. The time now is 07:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"