Juno Posted September 17, 2004 Share Posted September 17, 2004 Is there a way to enter a string into a worksheet cell using SetWsCellFormula, without the result being calulated? I would like to enter the strings '12-15' and '01' into two worksheet cells but the contents become '-2' and '1' respectively. I have tried to define the entire worksheet as contraining strings using : SetWSCellNumberFormat(WShandle,1,1,rows,columns,4,0,'',''); but to no avail. Thanks, -juno Quote Link to comment
MullinRJ Posted September 17, 2004 Share Posted September 17, 2004 You could use the Mdash (option '?' on a Mac) character and 12?15 will be seen as text. [ 09-17-2004, 05:31 PM: Message edited by: MullinRJ ] Quote Link to comment
Juno Posted September 17, 2004 Author Share Posted September 17, 2004 Interesting alternative, but since I need '01' strings as well, I think I'll kill two birds with one stone and surround every cell entry with single quotes and strip them out before exporting. Thanks for the suggestion. -juno Quote Link to comment
MullinRJ Posted September 18, 2004 Share Posted September 18, 2004 Sorry, I don't know how to do 01, but if the font is carefully chosen O1 (the letter "O") will work. Of course, it won't sort very nicely with other numeric strings. Raymond 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.
Note: Your post will require moderator approval before it will be visible.