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.
Related
Is it possible to create a .docx file from an Excel Add-In written in office.js?
My use case would be to open an Excel file (on Windows, so the host is an Excel Application), open the Add-In and the Add-In creates a Word document based on data within the Excel file.
From the things that I've seen, it is not possible to call the Word.run() host function from inside a Excel Add-In. I will always get an error that the namespace Word is unknown.
Is this even an intended feature to make 'cross-host calls'?
I had almost the same question: How to get the active PowerPoint presentation from Excel in office.js? and got the answer:
An Office add-in can only work with the Office application (Excel,
Word, PowerPoint, etc.) in which it is open. It cannot reach outside
the Office application to work with a document in another Office
application.
Eventually I moved back to VSTO and C#
I had a VB script function Sub Workbook_Open() that was copying a value from one cell (a total from previous day) to another cell at file opening. Now I would like to put my Excel sheet online (MS Excel Online) where execution of VB scripts is not supported so I am trying to realise the same functionality with a formula like =FUNCTION().
Is it possible and how to evaluate a formula only once each time at file opening in MS Excel Online (without using VB script)?
While you cannot use VBA in Excel Online, you may be able to use Office Scripts.
This new scripting technology is currently in preview and it also needs to be enabled by your tenant administrator.
https://learn.microsoft.com/en-us/office/dev/scripts/overview/excel
If you don't yet have access to Office Scripts, I'm afraid there is no solution for what you describe.
Unfortunately the Online MS Office Scripting is not yet a reality as you can see on this link. Hopefully Microsoft have mercy on us one day and allow us to have this crucial feature for some of our most important workbooks. In the meantime, we shall be using this feature only offline.
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.
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.
I've inherited an old Excel 2003 application, and need to convert it so that it works in Excel 2007. The application makes use of a spreadsheet as a "popup" inside the application for doing volume calculations. In Excel 2003, this works as expected. In Excel 2007, VBA complains with an "Object Required" error.
Browsing through the Object Browser, Excel 2003 lists "VolSheet" as a Spreadsheet object. Excel 2007 can't find it at all. Excel 2007 does list "VolSheet" as a Shape if you loop through all shapes (ActiveSheet.Shapes), however.
My question is: Is there a way to force Excel 2007 to recognize VolSheet as a spreadsheet? Would I have to Dim it somewhere and find a way to convert the Shape reference to a spreadsheet? Can I trick Excel 2007 into recognizing that it does in fact already exist inside one of the Worksheets?
Seems like you need to update your install of OWC on the 2007 machine
Office Web Components version 11 initially did not support Office 2007, but was updated to add it in SP1. See Link and Link for a security patch.