Page 1 of 1

Changing font for whole sheet changes £ to $

Posted: Wed Aug 27, 2008 3:20 pm
by STCEnergy
Hello

I have an existing spreadsheet that has 1 sheet which is in MS Sans Serif

I open the spreadsheet and then use the code below to change the font of my sheet for MS Sans Serif to Verdana

objFile.Sheet[0].CalcDimensionsEx;

objFile.Sheet[0].Range.Items[0,0,objFile.Sheet[0].LastCol,objFile.Sheet[0].LastRow].FontName := 'Verdana';

The font change works, however a currency column which originally was in the format £10.34 changes to $10.34

How do I stop this?

I am using a trial version of XLSReadWriteII 4. We currently use XLSReadWriteII but I think we are going to have to upgrade because if I do the same thing in version 2 all of my text columns are replaced with ?????

Cheers

Paul

Posted: Wed Aug 27, 2008 10:24 pm
by larsa
Hello

I don't know what may have happened, have never heard of anything similar.
But if you want to change the default font, change the properties of the Font object (of TXLSReadWriteII4).


Lars Arvidsson, Axolot Data

Posted: Thu Aug 28, 2008 8:37 am
by STCEnergy
I want to change the font of the existing data in the sheet

Do you want an example?