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.
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.
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.