|
I'm currently writing about dynamic typing, and I'm giving an example of Excel interop. I've hardly done any Office interop before, and it shows. The MSDN Office Interop tutorial for C# 4 uses the _Worksheet interface, but there's also a Worksheet interface...
Started by Jon Skeet on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Or Excel), _Worksheet (Excel)
classid Events x : ApplicationEvents4 (Word), AppEvents (ExcelI have seen and written quite a bit of C# / Excel COM Interop code over the last few years and I've seen Worksheet used in ....
|
|
I'm trying to delete a worksheet from a excel document from a .Net c# 3.5 application with the interop Excel class (for excel 2003).
I try many things like :
Worksheet worksheet = (Worksheet)workbook.Worksheets[1]; worksheet.Delete();
It's doesn't work...
Started by Melursus on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
That the workbook must contain at least one worksheet; this means you cannot delete all worksheets.
|
|
Using Application.CalculateFull() i can refresh entire worksheet. Is there a way to refresh only specific formulas in the worksheet and not the entire worksheet?
Started by Rashmi on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Now i need to add a refresh button that when clicked will refresh only those... .
All that works fine..
It exposes 3 user defined formulas (x, y , z) to excel application.
Calculate cell A3
Hey what i mean is i have developed an excel plugin..
|
Ask your Facebook Friends
|
Hello! I have search throughout this site to find a answer to my problem and most of the related solutions are for a far more complicated problem. Here is what I need to have done. I created a simple form in Excel 2007. I am looking for the ability to...
Started by Stat1124 on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Maybe something like this (tested in Excel 2003 only):
Dim srcSheet, dstSheet Set srcSheet here is a simple line of code to duplicate the active worksheet:
Sub Button1_Click() ActiveSheet.Copy after:=ActiveSheet End Sub
You should find ....
|
|
I have a bunch of Excel workbooks that contain multiple worksheets. I want to loop through each workbook and export each worksheet into it's own new workbook. I want one worksheet in each new workbook.
Here's what I've got so far:
Sub ExportWorksheet(...
Started by Gern Blandston on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
This is achieved by using Worksheet.Copy without specifying where in the workbook ... .
Within Excel this would be accomplished by copying the worksheet to a new workbook, not by creating a new workbook then adding the worksheet to it.
|
|
Hello.
I have created an application that uses Microsoft.Office.Interop.Excel, in my local and testing environments everything worked fine, but the app does not work in the production environment.
Turns out I have Office installed locally, as does the...
Started by stevenrosscampbell on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Do not need Excel to create worksheets, and you should avoid any solution that requires it for web options:
http://stackoverflow.com/questions/150339/generating-an-excel-file-in-asp-net
The Excel interop libraries work by....
|
|
I've got an Excel 2007 Spreadsheet and I'd like to write a VBA procedure to print particular worksheets by name. How do I do this?
For example, I'd like to print "FirstSheet","ThirdSheet", and "FourthSheet" but not "SecondSheet".
Started by Caveatrob on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Something similar to the following should work:
Dim sh As Worksheet For Each sh As Variant) Dim s As Worksheet Dim i As Integer If IsArray(Names) Then For Each s of sheets an Excel workbook can contain, I think this is negligible.....
|
|
I have a MS Excel workbook with several worksheets.
Users are directed to this spreadsheet using a hyperlink in an e-mail.
Is there any way of expressing the hyperlink for getting the spreadsheet to open on a particular worksheet?
Answer Snippets (Read the full thread at stackoverflow):
A hyperlink can open a workbook, but it will always open to the sheet and cell that were... .
You could write a macro in VBA:
Private Sub SetWorksheet() Worksheets("Worksheet1").Activate End Sub
I don't think that there is a way to do this directly.
|
|
Hi,
I have an Excel spreadsheet which is being used to specify filesystem build information for our Unix team.
This worksheet would have different information depending on the system to be built. For example, a production system would have many filesystems...
Started by Mark S on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
'in Sheet1 - code behind (alt....
Could create the entire Excel spreadsheet dynamically based on the user input Hi, if you can use VBA the code to fire on worksheet load or activation of a sheet, you can insert it in the relevant block: i.e.
|
|
Hi, I have an Excel file with 5 worksheets and I want with c# code to open it and when it is opened I want the sheet number 3 to be activated.
How can I do that?
Started by Erez on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
What about something like this: (untested)
//using Excel = Microsoft.Office.Interop.Excel, Type.Missing); Excel.Worksheet worksheet = (Excel.Worksheet)workbook.Sheets["Number 3"]; worksheet.Activate();
Like this:
using Excel; Excel....
|