Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a simple c# application
Excel.Application excelApp = new Excel.Application(); excelApp.Visible = true; string workbookPath = "/book.xls"; excelApp.Application.Workbooks.Open(workbookPath, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); excelApp.Cells[1, 1] = TextBox1.Text; When I run it from VS development Server it open Excel file Ok, but when I put it in virtual directory it runs excel.exe process and shows nothing, no errors what can it be? thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think your problem is the filename "/book.xls". The forward slash will go
to the root directory and look for book.xls. Your file is not on the root directory and needs a longer path name. "Alex" wrote: I have a simple c# application Excel.Application excelApp = new Excel.Application(); excelApp.Visible = true; string workbookPath = "/book.xls"; excelApp.Application.Workbooks.Open(workbookPath, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); excelApp.Cells[1, 1] = TextBox1.Text; When I run it from VS development Server it open Excel file Ok, but when I put it in virtual directory it runs excel.exe process and shows nothing, no errors what can it be? thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Perhaps something such as this:
Dim Path as String Path = ActiveWorkbook.path Set eastBook = Workbooks.Open(path & "\" & "East.xls") 'etc., etc., etc., etc., etc., Regards, Ryan--- -- RyGuy "Joel" wrote: I think your problem is the filename "/book.xls". The forward slash will go to the root directory and look for book.xls. Your file is not on the root directory and needs a longer path name. "Alex" wrote: I have a simple c# application Excel.Application excelApp = new Excel.Application(); excelApp.Visible = true; string workbookPath = "/book.xls"; excelApp.Application.Workbooks.Open(workbookPath, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); excelApp.Cells[1, 1] = TextBox1.Text; When I run it from VS development Server it open Excel file Ok, but when I put it in virtual directory it runs excel.exe process and shows nothing, no errors what can it be? thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
it is thw same if I do this
Excel.Application excelApp = new Excel.Application(); excelApp.Visible = true; excelApp.Application.Workbooks.Add(true); excelApp.Cells[1, 1] = TextBox1.Text; "Joel" wrote: I think your problem is the filename "/book.xls". The forward slash will go to the root directory and look for book.xls. Your file is not on the root directory and needs a longer path name. "Alex" wrote: I have a simple c# application Excel.Application excelApp = new Excel.Application(); excelApp.Visible = true; string workbookPath = "/book.xls"; excelApp.Application.Workbooks.Open(workbookPath, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); excelApp.Cells[1, 1] = TextBox1.Text; When I run it from VS development Server it open Excel file Ok, but when I put it in virtual directory it runs excel.exe process and shows nothing, no errors what can it be? thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
When excel opens.. | Setting up and Configuration of Excel | |||
Excel opens in Autosave.How do I delete it so it opens in Book1? | Setting up and Configuration of Excel | |||
Excel file opens and opens and opens | Excel Discussion (Misc queries) | |||
Excel opens correct view - web (used frontpg) opens it wrong | Excel Discussion (Misc queries) | |||
Personal workbook opens when Excel opens | Excel Discussion (Misc queries) |