I need to create a custom Excel 2010 ribbon (document level).
I have no Visual Studio, but have Visual C# 2010 express
If this is possible, please give me some gudelines.
You can customize the ribbon in Excel or any Office application without using Visual Studio, instead using a combination of XML and VBA.
A good starting-point for customizing the ribbon: http://msdn.microsoft.com/en-us/library/office/aa338202%28v=office.12%29.aspx (The title says Office 2007 but it will work for Office 2010 as well)
There is a free application that helps you design and validate the XML to modify the ribbon called the "Custom UI Editor For Microsoft Office": http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2006/05/25/customuieditor.aspx
Actually you have Visual Studio, but Express Edition and it shouldn't make any difference at this point ;)
I don't get your point about "Excel 2010 ribbon". I think that this is handled by Excel 2010 and it's part of User Interface of Office 2010, so if you open any Excel file in 2010 version you'll get ribbons. You can customize Office 2010 Ribbon and creating Excel files can be done in a lot of different ways i.e. using OpenXML, Microsoft Office Interop. Each has advantages and disadvantages.
Related
While using Visual Studio 2013/C# to create Excel automation ... I have both Office 2010 and Office 2013 on my machine. How do I create an add-in that will install into Excel 2010 or on another case install into 2013, my choice. Will creating a new 2010 or 2013 add-in project do the trick or do I have to configure something to steer it to one or the other? Thanks
You have to create an add-in per version of Office you wish to target. i.e. one for 2010; another for 2013 and so forth. The Office types used in each add-in are locked to that version of office. COM and Automation does allow you to create objects from version-independent PROG IDs but that's another story.
However if done right, you could abstract out some of your core code to be shared across Office installations.
I have developed an excel addin using VSTO in C#.net .Now i want to deploy this addin in other machines too .So that users who installed this can see my addin in excel menu -> Addins-> MyAddin
Alternatively can i give them just Excel with myaddin.So that whoever has this Excel can access addin and use it.This way they don't see myaddin in every excel file addins menu.
You can use a Visual Studio 2010 setup project to create a Windows Installer package. See this MSDN Link
Quote from that Link
Summary: Learn how to deploy a Microsoft Visual Studio Tools for the
Office system 2010 add-in or document- level solution using a Visual
Studio 2010 setup project to create a Windows Installer package that
targets the 2007 Microsoft Office system or Microsoft Office 2010.
Wouter van Vugt, Code Counsel
Ted Pattison, Ted Pattison Group
This article was updated by Microsoft with permission from the
original authors.
Applies to: Visual Studio 2010 Tools for Office, 2007 Microsoft Office
system, Microsoft Office 2010, Visual Studio 2010.
Download: http://code.msdn.microsoft.com/VSTO2010MSI
Contents
Overview
Deployment Methods
Deploying Office solutions that target the Visual Studio 2010 Tools for Office runtime
Download Samples Provided with this Article
Creating a Basic Installer
Conclusion
Additional Resources
About the Authors
EDIT
You may also see this link for All Users.
Conceptually, all you need to concentrate on is get yourself a COM object created which must be running even when the application (MS Excel here) is not open in the explorer.
More can be figured out from the following link :
http://www.codeproject.com/Articles/7859/Building-COM-Objects-in-C
(P.S : link is for c# not c).
Next you should give your users a .exe file including code to create the COM object.
I have a solution in VS2010 that was developed as an Excel 2007 add-in. Unfortunately something happened with my profile and since then VS runs the solution with Excel 2010. Somehow my profile got corrupted and my VS solution got corrupted too changing the Office library from 2007 to 2010. I tried changing the library back to 2007 but every time I open the VS solution VS changes it. Anyone has an idea how to fix this problem?
You must have installed Office 2010 which forces VS.NET to use the Office 14 PIAs. You can still deploy your add-in to Office 2007, you just have to be sure you don't use any Office 2010 specific features.
Also see related SO post .
Ok so i want to build an Excel plugin (custom task pane) that'll act on the selected range in the active worksheet.
Can't find any examples or documentation on how.
In addition to the references Mitch listed, I wrote an Excel VSTO add-in tutorial which uses a custom task pane to find differences between sheets and navigate to cells with differences on the active worksheet. Hopefully you'll find it helpful!
Office Development with Visual Studio: VSTO Developer Centre
Office Development with Visual Studio (MSDN Blog)
Office Development with Visual Studio Tutorial Series
HI All,
I want to export the excel file using c# and in excel it should have a ribbon (button in excel) called as refresh which will get the latest data from server.
Please let me know how to go forward..
You should have a look at VSTO. Visual Studio Tools for Office allows you to customize Office applications, using .Net. For Excel, you can customize specific documents or write add-ins, working from Visual Studio, in VB.Net or C#.