Excel formatting
Doug Easterbrook
doug at artsman.com
Wed Oct 7 20:34:47 EDT 2020
hi andy:
you might want to try the eval tricks like.
calc format as ‘kXLNumFormatNumber_d2’
if excelXcompExists
calculate cellFormat as eval(format)
end if
or… see if somebody will compile the latest xcomp external for you for studio 5.1
or … bite the bullet and go to the minimum version of omnis studip. I think its 5.2 that we compiled it for.
I’ll send you some really old versions privately that we used … but for the live of me, I don’t know what version of omnis it was compiled against. if it gives you the constants, then you are laughing — and thats all you need
Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 650-1978
> On October 7, 2020, at 3:52 PM, Andy Hilton <andyh at totallybrilliant.com> wrote:
>
> Using the excel object LibXL I am trying to apply formatting to columns….
>
> Not of itself that huge a deal - I create a Format object and apply a number format like so :
>
> Calculate Format.$numformat as kXLNumFormatNumber_d2
>
>
> Of itself all good - that can get applied to cells and life is good….
>
> However my base code is still at $5.1 without the excel object - so adding the code in to my base library gives me an error on finding the constant kXLNumFormatNumber_d2
>
> Looking at the constant it shows that this relates to a value of 3 - fair enough so in my base I save it as
>
> Calculate Format.$numformat as 3
>
> However running this (back on $10) produces a different result for the number formatting - using the actual kXLNumFormatNumber_d2 numbers come out like : 4586.31
>
> But if the code uses just the $numformat as 3 - then that same number comes out displayed as 4586 (no decimals) - the value held in the cell is correct it is simply the formatting that changes
>
> Does anyone know why there is a difference between using the ‘k’ constant and using a straight integer value ??? Its driving me mad :)
>
> Andy Hilton
> Totally Brilliant Software Inc
> Phone (US) : (863) 409 4870
> Phone (UK) : 0207 193 8582
> Web : www.totallybrilliant.com <http://www.totallybrilliant.com/>
> Helpdesk : http://totallybrilliant.kayako.com
> Email : andyh at totallybrilliant.com
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en
mailing list