Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Open Source Projects
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Ron McLeod
paul wheaton
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Himai Minh
Bartenders:
Forum:
Other Open Source Projects
Number Stored as Text in Excel Output
anvi kon
Ranch Hand
Posts: 148
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
I'm using jxl for exporting data from
java
to excel.
when I export data on excel the number stored as text not numbers, so I can't do arithmetic on these fields.
What is the best way to stored as a number on excel?
thanks,
Rob Spoor
Sheriff
Posts: 22850
132
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
How are you creating your cells?
Moving to Other Open Source Projects.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions
How To Answer Questions
anvi kon
Ranch Hand
Posts: 148
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I'm creating cells like below
public Label getFormattedLabel(int colnum, int rownum, String value, String type) { Label label2 = new Label(colnum, rownum, value); if(type == "d") label2.setCellFormat(getDataFont()); return label2; }
Calling like below
WritableWorkbook wb = null; NumberFormat nfCurrency = NumberFormat.getCurrencyInstance(java.util.Locale.US); wb.getSheet(0).addCell(getFormattedLabel(0, 3 , nfCurrency.format("123333.77"), "d"));
thanks
Ulf Dittmer
Rancher
Posts: 43081
77
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Isn't there a way to set the cell type explicitly to numeric? Also, "Label" sounds more like string-type entity than a numeric entity.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Problem with exporting data in excel
transfer data from jsp to an excel sheet
How to fix blue triangle in top left corner of cell in excel while creating using apache poi 3.6
populate data from csv into oracle
Need help in reading a file stored as a blob in database
More...