I'm trying to upgrade our XLS library to XLSReadWriteII5 and have hit problems with the default formats. Previously (with .xls files) the default was Arial and size 10, but after the upgrade the default seems to be Calibri and size 11. I'm trying to prevent this change to avoid users complaining.
I've applied the following code shortly after creating the object:
Code: Select all
oXLS.CmdFormat.BeginEdit(nil);
oXLS.CmdFormat.Font.Name := 'Arial';
oXLS.CmdFormat.Font.Size := 10;
oXLS.CmdFormat.AddAsDefault('ExcelDef');
oXLS.DefaultFormat := oXLS.CmdFormat.Defaults.Find('ExcelDef');
Is there a line of code I'm missing somewhere so the new tabs use the defaults from the first?
Many thanks,
James