Re: Make a cell in Excel display as text
Re: Make a cell in Excel display as text
- Subject: Re: Make a cell in Excel display as text
- From: Barry Wainwright <email@hidden>
- Date: Wed, 05 Aug 2015 08:06:16 +0100
The easy way is to do it exactly as you would in the UI - preface the numeric data with a ‘tick’ mark. ( ‘ )
Set value of cell (“B” & RowNum) to “‘“ & (item 2 of RowItems)
Barry
> On 4 Aug 2015, at 23:48, Jim Brandt <email@hidden> wrote:
>
> I need help with Excel scripting.
>
> I'm building a spreadsheet that has a column that has numerical data but it needs to be shown as text. i.e. the value "0322" needs to be seen in the cell as 0322, not the number 322. I need the leading "0".
>
> This can be done if I can figure out how to tell Excel that the cell contains text, not a number.
>
> I tried using a formula:
>
> set value of cell ("B" & RowNum) to "=text(" & (item 2 of RowItems) & ",\"0000\")"
>
> but the people wanting the spreadsheet said I can't use a formula in the cell, it has to be the text of the numerical data only.
>
> So, does anyone know how to tell Excel, using Applescript, that the format of a cell is text?
>
> TIA,
>
> Jim Brandt
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden