Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4085428
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:34:36+00:00 2026-05-20T18:34:36+00:00

I am writing a excel sheet with various floating values . It is absolutely

  • 0

I am writing a excel sheet with various floating values . It is absolutely necessary that i do not lose any decimal point when doing this. I am using this code:

              number = new Number(1, rowno2,biashidden[i]);
              sheet.addCell(number);

When i do this, the default format is only up to 3 decimal places. I can see the values written correctly in the excel sheet, but when do System.out.println , i see only values upto 3 decimal places. I do not know upto how many places the values will be, it may be 1.0 or it may 1.0000045667 ( thus i cannot specify a maximum limit using Numberformat too).
What should i do?
Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:34:36+00:00Added an answer on May 20, 2026 at 6:34 pm

    This is the code for my problem .

            WritableCellFormat wcf1=new WritableCellFormat(new  jxl.write.NumberFormat("#.###############"));
             wcf1.setShrinkToFit(true);
            try
             {
                       for(int i=0;i<=numberOfNeurons[0];i++)
             {
                              for(int j=0;j<numberOfNeurons[1];j++)
                {
                   number = new Number(0,rowno1,wtofnetwork[i][j],wcf1);
    
        sheet.addCell(number);
                rowno1++;
    
                }
                 }
    

    For some reason, we cannot specify the number of decimal places dynamically. so i gave enough decimal places so that no digit is lost. It is a crude way of doing it , but it achieves the purpose.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing an application that pulls values out of an Excel spreadsheet and then
I am working on writing the data into Excel sheet in c#. I have
I am writing a program that generates excel reports, currently using the Microsoft.Interop.Excel reference.
I'm writing a JUnit test for some code that produces an Excel file (which
I am using Apache POI for writing content into excel sheet. after generating an
I am writing a python script to read data from an excel sheet using
I am writing a reporting tool to document Excel files for various compliance criteria,
I'm writing a tool that syncs a simple database with Excel sheets. Each item
I am writing a program in C# that is required to reorder a sheet
While writing the excel file is fine I see that really long numbers are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.