I have written an ERP application wherein the user wants to save few reports directly to Excel and PDF. Right now I'm displaying the reports in List Control, which has to be saved to spreadsheet or PDF. I've written the application in VC++ MFC with Visual Studio 2005. Please help me how to do this.
To create PDF files I'd recommend
libHARU. It's excellent - fast
and easy to use.
For Excel files manipulation please see: How to
automate Excel from MFC and Visual
C++ 2005.
Related
I have coded an Excel add-in using Visual C#. This add-in appears as a COM add-in in Excel. However, I am quite sure that it used to appear as an Excel/VSTO Add-In in Excel before an update of Visual Studio. (I know that I was able to access the Globals class. This thread says that Globals can only be accessed in Excel add-ins.)
So my question is: How can I make my COM add-in an Excel/VSTO add-in?
When you create an Office project, Visual Studio automatically generates a class named Globals in the project. You can use the Globals class to access several different project items at run time from any code in the project.
You can start writing your VSTO Add-in code in the ThisAddIn class. Visual Studio automatically generates this class in the ThisAddIn.vb (in Visual Basic) or ThisAddIn.cs (in C#) code file in your VSTO Add-in project. The Visual Studio Tools for Office runtime automatically instantiates this class for you when the Microsoft Office application loads your VSTO Add-in. Read more about that in the Program VSTO Add-ins article.
Also, see Walkthrough: Create your first VSTO Add-in for Excel.
Well, if you used Microsoft.Office.Interop.Excel.... thats COM... Interoperability. VSTO is a COM.
Is it possible to build a Custom Task Pane for Excel 2007 or 2010 without Visual Studio, that is, using only VBA?
I found this other question but it's not working for me.
I think, as of now, the answer to your question is "No".
As far as I can tell, extending any Office application (Excel, PowerPoint, etc.) with a Custom Task Pane / Application Pane requires a COM add-in, that needs to be developed with Visual Studio.
At least for Office 2007, this article (https://msdn.microsoft.com/en-us/library/aa338197%28v=office.12%29.aspx) specifically states that:
(..) custom task panes are deployed as Component Object Model (COM)
add-ins (..)
The same article states that VBA does not support creating such custom task panes.
You can create custom task panes in any language that supports COM and
that enables you to create dynamic-linked library (DLL) files, for
example, Microsoft Visual Basic 6.0, Microsoft Visual Basic .NET,
Microsoft Visual C++, Microsoft Visual C++ .NET, and Microsoft Visual
C. However, Microsoft Visual Basic for Applications (VBA) does not
support creating custom task panes. Custom task panes use other
technologies with which you are already familiar, for example,
Microsoft ActiveX controls.
This article shows how to create a custom task pane with C# or VB in VS2013: https://msdn.microsoft.com/en-us/library/aa942846.aspx
All in all, this article (https://msdn.microsoft.com/en-us/library/bb398242.aspx) states that you need Microsoft Office Developer Tools for developing office solutions, which is only bundled with
Visual Studio Professional
Visual Studio Premium
Visual Studio Ultimate
If you only have VBA available it seems like your are stuck with the original User Forms for now.
I'm looking the same question.
I "think" the only way to make CTP is through VS.
And only way to make in VBA is with userFrom instead of custom task pane.
I have created a VSTO addin using word 2010 template. I am using .net 4.0.
I am interested same functionality in excel 2010 and Power point 2010. Is it possible the add in, already developed could be reuse in excel and power point 2010.
i.e the same add in will work for word 2010, excel 2010 and Powerpoint 2010. I am giving least preferance to create three addins, one for word 2010, excel 2010 and Powerpoint 2010 as the functionality of all the addin is same.
VSTO doesn't allow creating multihost add-ins. You can choose only one host per project in Visual Studio. Of course, you can create a single MSI installer for all your add-ins and deliver it as a single application. But you need to develop separate add-ins/projects in VS. Moreover, Office applications have different object models.
As an alternative way you may consider using Add-in Express which allows supporting multiple host applications in the single project.
I am trying to make a captcha application in Visual Studio 2013. I wrote all the code in C++ and it is generating the Bitmap image. Now i need to add a UI to this. Since, you cannot use Windows Forms Applications in Visual C++. I am trying to load a win32 console application and add the header files of MFC Application.
I can't figure out how to load the Bitmap images to display in the application. How do i achieve this task.
Thanks in advance. :)
Maybe you can try
Project->Add New Item...->Visual C++->UI->Windows Forms
And then you can use the picturebox UI.
I am newbie to Excel addins and Visual Studio. After some search, I came up with the following steps to create Excel automation addin: (I am using VS 2012)
create a C++ ATL project
add a STL Simple object
right-click on the object and add a method (with a IN and RETVAL parameters)
build the solution
register the dll with regsvr32
I am able to register the dll successfully. But the add-in does not show up in the Automation Servers available list in Excel 2010 (installed on my machine on Windows 7). Excel is 32 bit.
Thanks in advance
I was using the wrong regsvr32. Since I am building 32bit dll, I should be using regsvr32 from \Windows\SysWOW64.