Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel not visible in c#

Hi,

I am running excel 2000. with version 9.0 type library.

I cannot see the excel application, althought it appears on the taskbar.
I have tried the following code:

Excel.Application xlApp;
Excel.Workbook ExcelWorkbook;
Excel.Worksheet ExcelWorkSheet;
xlApp = new Excel.ApplicationClass();
ExcelWorkbook = (Excel.Workbook)(xlApp.Workbooks.Add(Type.Missing) );
ExcelWorkSheet = (Excel.Worksheet)ExcelWorkbook.Sheets["Sheet1"];
ExcelWorkSheet.Name = "My Sheet";
ExcelWorkSheet.Activate();
xlApp.Visible = true;
xlApp.UserControl = true;
ExcelWorkSheet.Cells[1, 1] = "test sheet";
xlApp.Quit();
Marshal.ReleaseComObject(ExcelWorkSheet);
Marshal.ReleaseComObject(ExcelWorkbook);
Marshal.ReleaseComObject(xlApp);

but it does not make the excel visible.

any help appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Excel not visible in c#

xlApp.Visible = True

This should enable you to see the app. Check Task Manager
to see if the app is running. If it doesn't appear in the
Applications tab,check the processes tab.
If it does appear in Applications, it may be that it's
coordinates got stuffed and it's off screen somewhere.


-----Original Message-----
Hi,

I am running excel 2000. with version 9.0 type library.

I cannot see the excel application, althought it appears

on the taskbar.
I have tried the following code:

Excel.Application xlApp;
Excel.Workbook ExcelWorkbook;
Excel.Worksheet ExcelWorkSheet;
xlApp = new Excel.ApplicationClass();
ExcelWorkbook = (Excel.Workbook)(xlApp.Workbooks.Add

(Type.Missing));
ExcelWorkSheet = (Excel.Worksheet)ExcelWorkbook.Sheets

["Sheet1"];
ExcelWorkSheet.Name = "My Sheet";
ExcelWorkSheet.Activate();
xlApp.Visible = true;
xlApp.UserControl = true;
ExcelWorkSheet.Cells[1, 1] = "test sheet";
xlApp.Quit();
Marshal.ReleaseComObject(ExcelWorkSheet);
Marshal.ReleaseComObject(ExcelWorkbook);
Marshal.ReleaseComObject(xlApp);

but it does not make the excel visible.

any help appreciated.
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel not visible in c#

Thanks Patrick.

I have tried that. The process is running (checked task manager)
but I cannot see the excel.

"Patrick Molloy" wrote in message ...
xlApp.Visible = True

This should enable you to see the app. Check Task Manager
to see if the app is running. If it doesn't appear in the
Applications tab,check the processes tab.
If it does appear in Applications, it may be that it's
coordinates got stuffed and it's off screen somewhere.


-----Original Message-----
Hi,

I am running excel 2000. with version 9.0 type library.

I cannot see the excel application, althought it appears

on the taskbar.
I have tried the following code:

Excel.Application xlApp;
Excel.Workbook ExcelWorkbook;
Excel.Worksheet ExcelWorkSheet;
xlApp = new Excel.ApplicationClass();
ExcelWorkbook = (Excel.Workbook)(xlApp.Workbooks.Add

(Type.Missing));
ExcelWorkSheet = (Excel.Worksheet)ExcelWorkbook.Sheets

["Sheet1"];
ExcelWorkSheet.Name = "My Sheet";
ExcelWorkSheet.Activate();
xlApp.Visible = true;
xlApp.UserControl = true;
ExcelWorkSheet.Cells[1, 1] = "test sheet";
xlApp.Quit();
Marshal.ReleaseComObject(ExcelWorkSheet);
Marshal.ReleaseComObject(ExcelWorkbook);
Marshal.ReleaseComObject(xlApp);

but it does not make the excel visible.

any help appreciated.
.

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
Excel: No visible table bethyb Excel Discussion (Misc queries) 2 October 24th 07 01:55 PM
Some gridlines are not visible in Excel Koen Excel Worksheet Functions 3 June 22nd 07 08:58 AM
Excel sheet not visible New group user 944 Excel Discussion (Misc queries) 4 June 16th 05 11:11 PM
Comma is not visible in Excel DrNASA Excel Discussion (Misc queries) 1 March 10th 05 04:51 PM
Autoshapes not visible on spreadsheet but visible in print preview John Excel Discussion (Misc queries) 3 February 11th 05 10:23 PM


All times are GMT +1. The time now is 02:23 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"