Click here to Skip to main content
15,889,403 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Write a program that reads data from TEXT file and check whether it is a number or not. If NUMBER, check whether it is palindrome or not. If it is palindrome, write a number in EXCEL file. If text check the length of TEXT.

What I have tried:

I have tried simple file handling concepts in java using fileinputstream so is it write or wrong and how to check data is no or string while reading input from txt file please tell me if youu have any idea
Posted
Updated 4-Sep-22 5:37am
v3
Comments
Dave Kreskowiak 4-Sep-22 11:15am    
You could be talking about writing to a CSV file, or Comma Separated Values. That is NOT an Excel file. It's a simple text file where each line in the file is considered a record and each value in a record is written with some kind of delimiter between values, like a comma or tab character.
Member 15756915 4-Sep-22 11:20am    
Thank you for your time , in the problem statement it is given that we have to read data from txt file and if it's palindrome then we have to write it into excel file and if it's string we have to count length of each string
Dave Kreskowiak 4-Sep-22 12:42pm    
This is a school assignment. I seriously doubt you have to create an actual Excel file. It's possible your teacher is using the term Excel to refer to a CSV file. You better when with your teacher to make sure.

Where did you find this question? You cannot create Excel files by simple filehandling. You need to find a Java library that supports the creation of Excel files.

See https://www.baeldung.com/java-microsoft-excel[^].
 
Share this answer
 
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.

If you are having problems getting started at all, then this may help: How to Write Code to Solve a Problem, A Beginner's Guide[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900