Skip to content
This repository has been archived by the owner on Jul 31, 2019. It is now read-only.

Exporting Number 0878 to Excel as Text, loses starting 0 #7

Open
dsworldtrip opened this issue Sep 13, 2010 · 0 comments
Open

Exporting Number 0878 to Excel as Text, loses starting 0 #7

dsworldtrip opened this issue Sep 13, 2010 · 0 comments

Comments

@dsworldtrip
Copy link

Hi,

Can't figure out how to export a Number with an initial 0 to Excel. For example :

if I want the cell to contain 0989

I do:

cell = sheet.getCell(currentRow, currentColumn);
cell.format = "text";
sheet.setCell(currentRow, currentColumn,cell.value);

But in Excel the value comes out as 989 and is stored in General Format.

There aren't any docs tat explain exatly how to use the .format property.

I also have other cells that I want to set in the number format, but cant seem to work that out either.

Any Ideas?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant