Jump to content

Excel format cell to text

Recommended Posts


I want to format excel cells to text, to prevent excel to convert 11E6 (text) to 11+E6 (Number).

I use the office generation toolkit.

What do i fill in the "Excel Set Cell Format.vi" to get this result?



I had a play with it and at first is frustrated me too, but I found a bit of a hack. The format code you need to use to force text is @

However if you write your text before you format the cell and a cell has 11E6 then Excel will auto format it because there is no format set, then if you format it to text you just get 11+E6 as text. But if you format the cell before anything has been written then the cell essentially doesn't exist or hasn't been allocated and the toolkit throws an error.

The way to do it is write an empty string constant to the desired cells, write @ as the format code then write your cell ie 11E6

The following is an example that demonstrates this.


  • Like 2
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.