Link to home
Start Free TrialLog in
Avatar of tradinfo
tradinfo

asked on

How to send formatted string to Excel via automation???

Hi all,
Do you know how to easily exporting a formatted string to a cell in Excel97 via OLE?

By formatted string I mean:
- specified the Font used for the string: name, size, bold & italic
- color of the string (e.g. red, yellow, etc...)
E.g: sending to a specific cell of Excel the string "This is a test",
with font "Comics", Size 16, Bold, and in red color ?

TIA
David.

Avatar of arikka
arikka

C++ or VB ?
You will have to do it following way:
1. Get IDispatch of Excel to request latter interface which allows you to modify specific cell
2. Set text
3. Set font

See in MSDN "HOWTO: Automate Linked and Embedded ActiveX Documents"
ID: Q193039

This artical shows how to do it.
ASKER CERTIFIED SOLUTION
Avatar of gelbert
gelbert

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial