ADOMD & Excel Integration - excel

All,
We have an Excel spreadsheet that uses ADOMD to query OLAP cubes and present the data in Excel. We are using version 2.8 at the moment of the ADOMD API. As far as I know there is an ADOMD.NET API for querying OLAP cubes. Can this new .NET version used from inside Excel ?
Many Thanks,
MK

ADOMD.NET can only be called from .NET code which means that you can't use it inside a VBA macro. You will have to create an Excel project in Visual Studio and write your code in the .NET language of your choice. There are 3 types of Excel projects in VS2010, Excel Document, Excel Template and Excel Addin.

Related

Build an add-in and UDF for all the Excel versions

One data provider wants to develop an Excel add-in, these are the requirements:
1) it can be installed on desktop. It adds one menu and buttons in Ribbon, and it also provides some specific functions (to get real-time data, like Bloomberg function).
2) the add-in should work in Excel 2007, 2010, 2013 and 2016.
The question is which technology should be used to create this add-in. Here are some of my thoughts:
1) JavaScript API for Excel does not fit, because it does not work for Excel 2007, 2010.
2) VSTO. Does anyone know if VSTO add-ins work for Excel 2013 and 2016?; Is it possible to build one VSTO add-in that works for all Excel 2007, 2010, 2013 and 2016?
3) C API for Excel. It seems that C API for Excel is used to build XLLs. Does anyone know if C API for Excel can build menu and buttons?
Here are some points :
JavaScript API , they are web based addin, so your add-in won't work without internet but it seems that your solution is for a data provider so I assume your clients will have internet. As you said, it didn't work for pre 2013 versions. see here
VSTO, probably the best option but you need to be aware of a major change related to MDI/SDI between Excel 2013 and previous version. Others small tweaks may appear (image idmso, some events..) but VSTO 2007 should be 2016 compatible. VSTO 2016 doesn't exist, the latest release is 2010 (Version 4.0 Runtime). You should test it regularly during development time to check the compatibility.
It is possible to add a menu (a dropdown list) and a toolbar via the Excel C Api (using xlfAddMenu and xlfAddToolbar) but not ribbon controls that require the COM Interface IRibbonExtensibility. So the only way to add controls to the rubbon is via the COM technology (from wich VSTO is based on). The Excel C API didn't change since the 2007 version so it will be fully compatible for all versions. You can find a working example in the Excel C API 2010 SDK (not in the 2013 SDK -this part has been removed), in the file GENERIC.C , see the xlAutoOpen function. Also please note that it is very difficult to find information about it.
From my point of view, you have two possibilities: 1) implement everything via VSTO or 2) to implement your routines via the Excel C API and to interact with it via a VSTO addin that is just used for ribbon controls. I would suggest you the first solution (VSTO), you'll find more documentation about it.
EDIT :
Just realized your question is also about UDF. There are three ways to add UDFs to Excel : via VBA, via a COM automation and via the Excel C API. The best option for UDF is definitively the EXCEL C API but there exist an open source project that "wrap" this API in C#, see Excel DNA.
EDIT 2 :
As an alternative to VSTO, still in Net, there is the NetOffice project on Codeplex that it is worth trying it, they claim that they support all Excel versions. It won't help you regarding the UDFs part but for the GUI it seems to be a good candidate.

How to make excel linked to another excel file in Sharepoint 2010

I have 3 Excel files that are uploaded in Sharepoint 2010. In one theme every cell links to one of three Excel files. In Sharepoint without opening in Excel on desktop, is there any way to update linked data? Is there any way to run VBA?
Sorry for my bad English.
VBA and external data ranges (also quoted query tables) are not supported by SharePoint 2010 and neither so by SharePoint 2013 while using Excel Services to view these files online.
These features are only supported if you open them within Excel itself.
Here is the complete answer from Microsoft:
https://msdn.microsoft.com/en-us/library/office/Ff595319.aspx

how to use a macro in excel

The question is there are 'n' different ppts and I want to put all the ppts in one single ppt. Condition is I should not use copy paste rather I should write a function in excel using macros to get it done. So how do I do this?
It looks like you need to automate PowerPoint from Excel. The How to automate PowerPoint by using Visual Basic in Office 2003, in Office XP Developer, and in Office 2000 Developer article describes all the required steps for getting the job done. Be aware, the reference number corresponds to the Office installed on your machine. For example:
Microsoft PowerPoint 15.0 Object Library
Stands for PowerPoint 2013 and etc.

Programmatically auto select an Excel table in Visual Basic in an Add-In

When using Excel, pressing CTRL+* (asterisk) when the cursor is inside a table, automatically identifies the table and selects it.
Is there a way to do exactly that when writing an Excel add-in in Visual Basic using Visual Studio 2013?
Use the Macro Recorder to generate the equivalent VBA object model calls: that should give you enough information to identify the VB.NET Interop calls.
(Using the Macro recorder in this way saves hours of trying to work things out from the documentation)
In this case you get
Selection.CurrentRegion.Select

Is Excel Object Model changed in 2010?

I have a very old VB6 application, we have lost the source code. It can call excel 2003, 2007 to
Launch excel
Insert value to the new sheet cells.
I guess it use com to automate the excel, anyway we lost the source code and cannot contact the programmer.
After we upgrade the office to 2010, it cannot insert value anymore, just a blank sheet ....why?
Do anyone have the same experience as me? old win32 program work on excel 2003/2007 , but don't work on 2010.
Attach screenshot for your reference:
when using excel 2007 , it can fill the value to sheet.
when using excel 2010 , it cannot, and the windbg show some exceptions, how can I troubleshoot it?
Even if you could trace/capture, I don't think that would help you much.
Based on the simplicity of the code, you would be better off remaking it from scratch. If it's something proprietary and very useful, you should probably consider having both versions installed at the same time, which has worked for me just fine.

Resources