Format Cell as Percentage and DateTime

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
vdev
Posts: 1
Joined: Thu Jun 15, 2017 9:21 am

Format Cell as Percentage and DateTime

Post by vdev »

Hi guys,

1. How can i format a cell as a percentage?


2. If I set the style of a cell that doesnt have a value I get an access violation. Is there a way to "prepare" the cell for formatting while there is no value behind it?
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Format Cell as Percentage and DateTime

Post by larsa »

Hello

1. Set the NumberFormat property to '0.00' if you want two decimals.

2. Make the cell a blank cell, like: XLS[0}.AsBlank[Col,Row] := True;
Lars Arvidsson, Axolot Data
Post Reply