|
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 ....
|
|
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..
|
|
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.
|
Ask your Facebook Friends
|
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.....
|
|
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 have around 25 worksheets in my workbook (Excel spreadsheet). Is there a way I can protect all the 25 worksheets in single click ? or this feature is not available and I will have to write a VBA code to accomplish this. I need very often to protect ...
Started by Dheer on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Here is the code:
Dim ws as Worksheet Dim pwd as String pwd = "" ' Put your password here For Each as Worksheet Dim pwd as String pwd = "" ' Put your password here For Each ws In Worksheets ws.Unprotect.
|
|
Hello again. I'm having a problem transferring a worksheet into another workbook. I've written several macros in my first workbook, as well as 1 or 2 forms, and I need to be able to move this worksheet that contains these macros and forms into a new workbook...
Started by outcastillusion on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If you have used the special modules from the Microsoft Excel Objects section of the explorer (e.g..
|
|
I know how to loop through all the worksheets in a workbook, and how to exit once I reach an 'end-flag' worksheet:
For Each ThisWorkSheet In Worksheets If ThisWorkSheet.Name = "FlagEnd" Then Exit For MsgBox "This worksheet name is: " & ThisWorkSheet.Name...
Started by Kirk Hings on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
True If ThisWorkSheet.Name = "FlagEnd" Then Exit For If output = true Then MsgBox "This worksheet]
Sub Iterate() Dim book As Workbook Dim flagIndex As Integer Dim flagSheet As Worksheet Set book As Integer Dim currentSheet As Worksheet....
|
|
Hi,
I'm trying to create a VLOOKUP formula in excel, however, the table array may be in a number of different worksheets.
For example, I have this forumula
=Vlookup(a1, ‘[Datafile.xlsx]worksheetapples’!$A1:F500,3,False)
This works fine in a single scenario...
Started by James.Elsey on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at superuser):
Check what it happens to A2 value!
Try using INDIRECT , as in
=Vlookup(a1, INDIRECT(CONCATENATE("‘[Datafile.xlsx]",B1,"'!$A1:... .
For example, put [Datafile.xlsx]worksheetapples’!$A1:$A10 as text in A1 and =SUM(INDIRECT(A1)) in A2 .
Use INDIRECT function.
|
|
Hi all,
I am just starting to fiddle with Excel via C# to be able to automate the creation, and addition to an Excel file.
I can open the file and update the data and move through the existing worksheets. My problem is how can I add new sheets?
I tried...
Started by Jon on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
If you don't already, you must have add a COM reference in your project to the "Microsoft Excel) { Microsoft.Office.Interop.Excel.Application xlApp = null; Workbook xlWorkbook = null; Sheets xlSheets = null; Worksheet xlNewSheet; // Uncomment....
|