Forum Discussion
1 Reply
Sort By
- AlexeyKSmartBear Alumni (Retired)
Hi,
You can record a test that will change the color from the Excel UI and explore the recorded test commands.
An alternative approach is to work with Excel via COM. For more information on this and on the Excel object model, see the Excel documentation. Here is a code snippet that demonstrates how to change the color of the current active cell via COM:
// This code assumes you have Excel launched and some workbook opened in it.// Connect to Excel via COM
var ExcelApp = Sys["OleObject"]("Excel.Application");// Red
ExcelApp["ActiveCell"]["Font"]["Color"] = 0x0000FF;// Green
// ExcelApp["ActiveCell"]["Font"]["Color"] = 0x00FF00;// Blue
// ExcelApp["ActiveCell"]["Font"]["Color"] = 0xFF0000;
Related Content
Recent Discussions
- 3 hours agotramuntana
- 2 days agoSlickRick