QAxObject Excel sheet -- set default font for entire Excel sheet

876 Views Asked by At

I am able to set the size & font of a single cell.

QAxObject *range = excelSheet->querySubObject("Cells(int,int)", row, col);
range = range->querySubObject("Font");
range->setProperty("Size", 10);
range->setProperty("Name", "Arial");

How can i change the FONT default size & type of full excel sheet ?

1

There are 1 best solutions below

3
On

See http://dynamicsuser.net/forums/p/10304/52610.aspx, you have to select all the cells in the sheet (as a range), and then select the font for them. Try to adapt the following VB code:

xlsRange := xlsWorksheet.Cells;
xlsRange.Font.Name := 'Zapf Dingbats';