Forums Register Login

writing into excel sheet

+Pie Number of slices to send: Send
Hi all,

My requirement is I have to write the Data into a Microsoft excel sheet. That I was able to do. But now my problem is, I have new requirement of writing into same excel sheet for whole month. I mean my program has to create a new excel sheet every month starting and should write all data into same excel till that month end. Even my program runs repetitively for every 30min in a day. I have attached my program here below which will write into excel sheet. Can anyone suggest me the modification which satisfies my requirement.

Thanks in advance,
Ranjan



+Pie Number of slices to send: Send
Currently the code uses only a single sheet. You'll have to add new ones for each month: http://poi.apache.org/spreadsheet/quick-guide.html#NewSheet You may want to give the sheets meaningful names, maybe the month names, or a number from 1 to 12.
+Pie Number of slices to send: Send
That part is okay… but how can I write into same sheet again and again, because my program will run for every 30 min. How can write all the values into the same sheet in a span of one month. Please suggest some solution. Should I have to do some modification in constructor?
+Pie Number of slices to send: Send
I'm not sure I fully understand the question, but you can get references to existing sheets using the HSSFWorkbook.getSheet(String) and HSSFWorkbook.getSheetAt(int) methods.
+Pie Number of slices to send: Send
Thanks a lot...
+Pie Number of slices to send: Send
Actually procedure should be save all data in data base and generate monthly report in xls sheet format. I don’t understand why all data writing requirement in same xls sheet in every 30 minute. I could think simple scenario if machine crashes or xls modified or deleted where will find the backup data means all data will be lost.

Don’t mind if you are not agree…
Won't you be my neighbor? - Fred Rogers. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 3512 times.
Similar Threads
opening the excel sheet from servlet
facing diffculty to highlight background color of an excel cell which is not reflected in file
How to connect to Open Office Database using JDBC connection in Java
root cause of problem ,why 2003 excel cell background color is not reflecting in orginal document
How to make POI HSSF support Chinese Encoding?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:04:34.