• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Please help for this Problem in creating excel sheet using java

 
Ranch Hand
Posts: 85
MySQL Database Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am creating an excel file with my java code.

Here is the code




This should create 20 cells in the excel sheet but its not working properly


Please help....
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does "it's not working properly mean"? What, exactly, does happen? Seeing an SSCCE would help.
 
Ifteqar Ahmed
Ranch Hand
Posts: 85
MySQL Database Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ulf,

The statement at line 10 is displaying

3.41
5.55
4.79
1.92
1.86
2.68
1.24
1.21
1.54
1.53
1.59
1.5
1.27
1.28
1.34
1.89
3.56
1.33
2.9

but these values are not getting published in excel sheet

In excel sheet i am getting these values at row 1

2.9 3.55 1.26 1.27 1.34 2.68 1.24 1.21 1.52 1.52

 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Without seeing an SSCCE it's hard to tell what's going on. What is "s", for example?

Also, what are the for loop and the if statement supposed to do? The while loop already takes care of iterating over all elements of "stk".
 
Ifteqar Ahmed
Ranch Hand
Posts: 85
MySQL Database Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is my complete code





Here is the complete code..........
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So what's the output of the stack traces?

Note that the second while loop is pointless, as it will never loop.
 
Ifteqar Ahmed
Ranch Hand
Posts: 85
MySQL Database Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ulf,

Thank You very much. My program is working fine after removing that for loop.

Here is the modified code



 
Can you really tell me that we aren't dealing with suspicious baked goods? And then there is this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic