Creating an Automation Excel Add-In

Creating an Automation Excel Add-In

Postby MC » Mon Feb 19, 2007 3:20 pm

User avatar
MC
 
Posts: 7
Joined: Sat Feb 17, 2007 12:58 am
Location: Singapore

Postby Cuchulainn » Sun Mar 04, 2007 8:05 pm

This C# code is a lot easier than the corresponding code in C++. In C++ more more plumbing is needed. In all fairness, once you get it working in C++ you know it for all time.
User avatar
Cuchulainn
 
Posts: 668
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

Postby zhouxing » Mon Jun 29, 2009 2:10 pm

Here you can find a compilable example
zhouxing
 
Posts: 4
Joined: Mon Jun 29, 2009 12:20 am

Postby Cuchulainn » Sat Jul 24, 2010 9:25 pm

Using basic Charts in Excel
Attachments
Program.cs
(3 KiB) Downloaded 1616 times
User avatar
Cuchulainn
 
Posts: 668
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

Postby Cuchulainn » Sat Apr 30, 2011 7:10 pm

Steps in getting contact with Excel from .NET C#



1. Create C# Shared Add in Project (under "Other Projects")

2. Right mouse click your project name

3. Choose Add Reference

4. Choose Mcrosoft Excel Library*** (compatible version)(from COM tab page!); click it

(RCW wrapper automagically created).

5. Look! It's in Solution Explorer

6. Test with some C# code I have provided



next step is to try with your own COM dll.
User avatar
Cuchulainn
 
Posts: 668
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

compare date from string in excel and format date in excel

Postby tallent_e » Mon Oct 10, 2011 12:56 pm

thank you for your very useful example codes.



i started a little project. roughly speaking i aim at automatically updating an Excel spreadsheet from data released weekly on the internet.



i first check whether or not my Excel file is up-to-date.



a regex extracts the date contained in the webpage that is the date of the latest update online. i thus come up with a string, right ? (and that might be my problem)



now, i need to check whether the corresponding date (in Excel dd/mm/yyyy date format) yet exists in the spreadsheet (more exactly, in the B column) .



what is smart way to cope with that ? i guess there is casting involved ?



thank you. :-)
tallent_e
 
Posts: 5
Joined: Tue Nov 09, 2010 1:52 pm
Location: France

Postby tallent_e » Tue Oct 11, 2011 11:58 pm

i think i can cope finding out support at http://www.dotnetperls.com/time ;)
tallent_e
 
Posts: 5
Joined: Tue Nov 09, 2010 1:52 pm
Location: France

Postby Cuchulainn » Mon Dec 02, 2013 10:07 pm

Example of interfacing databases and Excel.
User avatar
Cuchulainn
 
Posts: 668
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands


Return to C#

Who is online

Users browsing this forum: No registered users and 1 guest