Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi,
I am generating excel automatically using jsp. I am having some of my fields with leading zeros( like 001,002.. etc). But once I generate the excel the leading zeros are truncated automically by excel. My question here is how do i retain this leading zero fields without changing the field type( as i dont dont change the data type programatically in jsp). Also i dont want to add any special characters infront of the data. Pl. help me to retain the field data with leading zeros. Thanks |
#2
![]() |
|||
|
|||
![]()
Hi
There are 3 differnt ways to have leading zeros in excel. 1. Preceede the numeric string with an ampersand, like '001. Such entrie is interpreted by Excel as text string "001". 2. Format the cell as text before entering the value. 3. Format the cell as Custom "000". Unlike other two, the entry is numeric, so you can use it in mathematical expressions without any need to convert it before. PS. For first 2 ways, "001"<"1", for last one 001=1 -- Arvi Laanemets (When sending e-mail, use address arvil<Attarkon.ee) "kumarappans" wrote in message ... Hi, I am generating excel automatically using jsp. I am having some of my fields with leading zeros( like 001,002.. etc). But once I generate the excel the leading zeros are truncated automically by excel. My question here is how do i retain this leading zero fields without changing the field type( as i dont dont change the data type programatically in jsp). Also i dont want to add any special characters infront of the data. Pl. help me to retain the field data with leading zeros. Thanks |
#3
![]() |
|||
|
|||
![]()
Minor English correction.
1. Preceede the numeric string with an ampersand, like '001. Such entrie is interpreted by Excel as text string "001". apostrophe = ' ampersand = & Arvi Laanemets wrote: Hi There are 3 differnt ways to have leading zeros in excel. 1. Preceede the numeric string with an ampersand, like '001. Such entrie is interpreted by Excel as text string "001". 2. Format the cell as text before entering the value. 3. Format the cell as Custom "000". Unlike other two, the entry is numeric, so you can use it in mathematical expressions without any need to convert it before. PS. For first 2 ways, "001"<"1", for last one 001=1 -- Arvi Laanemets (When sending e-mail, use address arvil<Attarkon.ee) "kumarappans" wrote in message ... Hi, I am generating excel automatically using jsp. I am having some of my fields with leading zeros( like 001,002.. etc). But once I generate the excel the leading zeros are truncated automically by excel. My question here is how do i retain this leading zero fields without changing the field type( as i dont dont change the data type programatically in jsp). Also i dont want to add any special characters infront of the data. Pl. help me to retain the field data with leading zeros. Thanks -- Dave Peterson |
#4
![]() |
|||
|
|||
![]()
Hi Dave
Thanks for correcting me! (I had some vague feeling that something was wrong, when writing my answer.) Arvi Laanemets "Dave Peterson" wrote in message ... Minor English correction. 1. Preceede the numeric string with an ampersand, like '001. Such entrie is interpreted by Excel as text string "001". apostrophe = ' ampersand = & Arvi Laanemets wrote: Hi There are 3 differnt ways to have leading zeros in excel. 1. Preceede the numeric string with an ampersand, like '001. Such entrie is interpreted by Excel as text string "001". 2. Format the cell as text before entering the value. 3. Format the cell as Custom "000". Unlike other two, the entry is numeric, so you can use it in mathematical expressions without any need to convert it before. PS. For first 2 ways, "001"<"1", for last one 001=1 -- Arvi Laanemets (When sending e-mail, use address arvil<Attarkon.ee) "kumarappans" wrote in message ... Hi, I am generating excel automatically using jsp. I am having some of my fields with leading zeros( like 001,002.. etc). But once I generate the excel the leading zeros are truncated automically by excel. My question here is how do i retain this leading zero fields without changing the field type( as i dont dont change the data type programatically in jsp). Also i dont want to add any special characters infront of the data. Pl. help me to retain the field data with leading zeros. Thanks -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display cell value on a chart. | Charts and Charting in Excel | |||
How do I set a cell to "Empty" so that it does not display in a ch | Charts and Charting in Excel | |||
make a cell empty based on condition | Charts and Charting in Excel | |||
Cell value as chart scale maximum | Charts and Charting in Excel | |||
Transferring cell content between workbooks using cell references | Excel Discussion (Misc queries) |