0

I did not solve this question. in console: -Name? -merve -Number? -123 -Name? -xxxx Number? -xxx Like this, I will ask name and number in console,It will write to Excel this data when He/She answered.

merve
  • 1
  • 1
  • 1
    Could you please be more precise? How should the desired Excel workbook look after execution? What code have you tried so far? Do you know how to write to an Excel workbook using apache.poi? – deHaar Nov 14 '18 at 11:06
  • @deHaar my First excel experience. I know write to an Excel workbook using apache poi, I can write cell but I can not write data from user to Excel. – merve Nov 14 '18 at 11:12
  • 2
    You just have to store input from the console in some variables and write their values to the Excel workbook after input has been closed. Do you know how to receive user input? If not, see [this](https://stackoverflow.com/questions/11871520/how-can-i-read-input-from-the-console-using-the-scanner-class-in-java/31241089), for example... – deHaar Nov 14 '18 at 11:14
  • Thank you so much, I know receive user input with Scanner but how to write excel this data and in loop( name? -merve :writing excel: name?dehaar :writing excel: like this 10 persons..) @deHaar – merve Nov 14 '18 at 11:21
  • It is more difficult to write every single dataset into an opened workbook. I would store them in a data structure, maybe a POJO or a `Map`/`List` and then, after all input has been done, loop through the data structure and write the values to the workbook. – deHaar Nov 14 '18 at 11:41
  • @deHaar thank you , I will try it.. – merve Nov 14 '18 at 11:44
  • No problem, try it, that's very good. If it does not work, then edit your question and include your code. People (like me) will read and help then... – deHaar Nov 14 '18 at 11:45

0 Answers0