hannecroonen
4 years agoContributor
Write values to excel in different fonts/font colours
Hi guys,
small question for you all:
I am saving the time it took to run certain test into an excel file as following (javascript based):
var fileName = "Y:\\Automation\\Automation\\Testscenario's\\Timings.xlsx";
var excelFile;
var excelSheet;
if (aqFile.Exists(fileName))
{
// Open the existing Excel file
excelFile = Excel.Open(fileName);
excelSheet = excelFile.SheetByIndex(8);
// Write the data into a new row of the existing file
var rowIndex = excelSheet.RowCount + 1;
excelSheet.Cell("A", rowIndex).Value = feature.Tags.Item(0);
rowIndex++;
excelSheet.Cell("A", rowIndex).Value = aqDateTime.Today();
excelFile.Save();
}
This works just fine but I was wondering if I could maybe use some different fonts or colours for these values?
Would be nice to distinguish some timings from the others by using a different font/colour but I can't seem to find a way to do this anywhere...
Thanks for the help!