Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default C# syntax for getting multiple sheets?

I haven't been able to find the syntax for doing the following in C#:

Sheets(Array("Sheet1", "Sheet3")).PrintOut

Is it possible, how?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default C# syntax for getting multiple sheets?

I'm no expert on C#, but perhaps the problem is that it doesn't "understand"
the array statement. Perhaps you can create a standard array, put the two
sheet names into it, and then print. Or print as 2 print jobs.

On Tue, 04 Oct 2005 21:59:24 +0200, Mattias Beermann wrote:

I haven't been able to find the syntax for doing the following in C#:

Sheets(Array("Sheet1", "Sheet3")).PrintOut

Is it possible, how?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default C# syntax for getting multiple sheets?

I figured out the correct syntax today, the error I did before was to
cast the result into the wrong type. If anyone else has the same
problem, the correct solution is:

string[] s = new string[] { "Kunder", "Konsulter" };
Sheets sheets = (Sheets)workbook.Sheets[s];
sheets.PrintOut(Missing.Value, Missing.Value, copies, false, printer,
Missing.Value, true, Missing.Value);

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
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA Amaxwell Excel Worksheet Functions 4 August 17th 06 06:23 AM
Syntax for IF with multiple criteria SueJB Excel Worksheet Functions 7 December 20th 05 06:47 PM
Multiple Condition syntax needed Jetheat Excel Programming 3 May 30th 04 11:18 PM
listbox1.additem syntax for multiple columns Russ Robelen Excel Programming 4 December 31st 03 09:01 PM
Macro Questions: Returning multiple results, description of parameter syntax et al. Frederik Romanov Excel Programming 1 July 17th 03 04:42 PM


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