Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default excel does not opens on IIS

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default excel does not opens on IIS

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default excel does not opens on IIS

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default excel does not opens on IIS

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
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
When excel opens.. Ben Setting up and Configuration of Excel 0 May 29th 10 06:30 PM
Excel opens in Autosave.How do I delete it so it opens in Book1? Christine Setting up and Configuration of Excel 1 February 15th 10 02:10 AM
Excel file opens and opens and opens Wanna Learn Excel Discussion (Misc queries) 1 June 9th 09 11:03 PM
Excel opens correct view - web (used frontpg) opens it wrong Jim2003 Excel Discussion (Misc queries) 1 July 27th 05 10:25 PM
Personal workbook opens when Excel opens SheriTingle Excel Discussion (Misc queries) 2 March 30th 05 12:22 AM


All times are GMT +1. The time now is 12:37 PM.

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

About Us

"It's about Microsoft Excel"