Ad Dekkers Posted July 30, 2009 Report Share Posted July 30, 2009 Hello, 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? Thanks Quote Link to comment
Kurt Friday Posted July 31, 2009 Report Share Posted July 31, 2009 Hello, 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? Thanks Hey 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. 2 Quote Link to comment
Ad Dekkers Posted July 31, 2009 Author Report Share Posted July 31, 2009 Thanks for your help! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.