Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet Reading excel via JSP
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Gopinath Ashokan
Reading excel via JSP
1 Answer(s)      a year and 10 months ago
Posted in : JSP-Servlet


The problem is while reading cells values which all are having "space" between the word, I can read only till space after that space the word has been dropped.

for Example  
Name                 CareerStart
gopinath Ashokan     December 2005

after read 
Name         CareerStart
gopinath     December 

can you help me in that and tell me how to ignore the space between words and get full cell value? I am reading the value as follows


HSSFCell cell2 = row.getCell(1);
if (cell2 != null) {                            
switch (cell2.getCellType()) {
case HSSFCell.CELL_TYPE_NUMERIC:name = ""+ cell2.getNumericCellValue();     
break;  
case HSSFCell.CELL_TYPE_STRING:name = cell2.getStringCellValue();
break;  
}   
}
HSSFCell cell5 = row.getCell(4);
if (cell5 != null) {
switch (cell5.getCellType()) 
{   
case HSSFCell.CELL_TYPE_NUMERIC:CareerStart = ""+ cell5.getNumericCellValue();
break;
case HSSFCell.CELL_TYPE_STRING:CareerStart = cell5.getStringCellValue();
break;
}
}

<td><input type="text" name="name" value=<%=name%>></td>
<td><input type="text" name="CareerStart" value=<%=CareerStart%>></td>

anyone please help me to resolve that space issue(means while reading the cell values space should be ignored between the words)


Advertisement
View Answers

January 30, 2013 at 3:33 PM


Hi Team, I have found the solution for my question. The problem happended because I getting the values inside "text" field. So the "text" field taking the value after space as text field's "attribute value". To avoid this get the value as follows

<input type="text" name="name" value='<%=name%>'></td>
<input type="text" name="careerstart" value='<%=careerstart%>'></td>

Note: simply I have added single quotes for the value field in the "text".



Related Tutorials/Questions & Answers:
Reading excel via JSP
Reading excel via JSP   The problem is while reading cells values... the space between words and get full cell value? I am reading the value...(means while reading the cell values space should be ignored between the words
excel sheet reading and using that data - JSP-Servlet
excel sheet reading and using that data  i have to do a read a excel sheet file of a employee record and then i have to use a employee details to send mail to those employees how to do in jsp sir please help me sir.. Thanks
Advertisements
Error in reading Excel data using jsp
Error in reading Excel data using jsp  ERROR while executing bellow...) at org.apache.jsp.AdminSaaS.excelreading_jsp._jspService(excelreading_jsp.java:71... is not a proper xls file. It's a text file with a .xls extension s.t. Excel can quietly
uploading and reading the excel daa
uploading and reading the excel daa  uploading the excel file not getting the data of the excel
Reading an excel file into array
Reading an excel file into array  Hi, I'm trying to read in an excel file, search a column for containing key words (entered by a user) and then displaying the matching rows in a table. I'm fairly new to JavaScript. Can anyone
reading excel sheet in java
reading excel sheet in java  can anyone tell me a proper java code to read excel sheet using poi   Here is a java code that reads an excel file using POI api and display the data on the console. import java.io.
Reading and querying an Excel file in JavaScript
Reading and querying an Excel file in JavaScript  Hi, I'm trying to read in an excel file, search a column for containing key words (entered by a user) and then displaying the matching rows in a table. I'm fairly new
Excel sheet image reading issue
Excel sheet image reading issue   Hello every one.I?m trying to read images from an excel sheet using OleDbDataReader. My excel file has 6... reading the record, It?s doing fine on the first 5 columns but return me
Error in reading Excel data using jsp even having .xls and POI Library in respective folders
Error in reading Excel data using jsp even having .xls and POI Library in respective folders  Hi, hello.xls and POI library files are there in respective folders. the printStackTrce() method shows the following Error message
Export data in excel sheet via Browse and upload button into mysql database
Export data in excel sheet via Browse and upload button into mysql database  how to create a Browse & Upload Buttons and then save the information from it in mysql database's Table Am using struts2,hibernate for making
Reading the Date and time values from excel sheet
Reading the Date and time values from excel sheet  hi guys , iam trying to read excel sheet data using apache poi api .my problem is i cant read the date(dd/mm/yy) and time(hh:mm:ss) values concurrently from two different cells
reading data from excel file and plotting graph
reading data from excel file and plotting graph  I am doing a project using NetBeans in which i have to take input an excel file and then using the data in excel file, i have to plot graphs based on CELL ID selected. please help
JSP TO EXCEL
JSP TO EXCEL  Hi sir/mam, How to import data to excel using jsp without retrieving database.   friend, you can't import excel data into the middle of an HTML pages (your JSP will result in an HTML page
JSP to Excel - JSP-Servlet
JSP to Excel  Need an example of JSP and Excel database connection. Thanks
Reading cookies in jsp
Reading cookies in jsp   How read cookies in jsp ?   Creates a cookie, a small amount of information sent by a servlet to a Web browser, saved by the browser, and later sent back to the server. A cookie's value can
jsp to excel - JSP-Servlet
jsp to excel  Hi All, I'm writing a program of jsp to Excel conversion with Using POI. My problem is i'm unable to put multiple data into excel...)); } FileOutputStream fileOut = new FileOutputStream("c:\\excel\\wct.xls
External file reading in jsp
External file reading in jsp  i have written a jsp page(ReadExt.jsp) in my application which reads a text file content from a system... used java code in jsp page ... and tel me how can i make it work in other system
Remember me on this computer (via cookies) in jsp servlet
Remember me on this computer (via cookies) in jsp servlet  Remember me on this computer (via cookies) in jsp servlet   Hi, Here is the detail of using cookies to identify the user. In Servlet or JSP you can set
External file reading in jsp
External file reading in jsp  i have written a jsp page(ReadExt.jsp) in my application which reads a text file content from a system .. but this ReadExt.jsp page is not working in other system when i open that application
Create Bar Graph from reading excel sheet in Java
Create Bar Graph from reading excel sheet in Java  I'm New to Java and I have to create a java program where I have to read data from multiple excel... in the different excel sheets (data can change and based on that graph should also get
Reading And Writing Excel File
reading and writing excel file   ... words, we can say that it is used to read the excel file. After reading the excel... the excel sheet  using java . The package we need to import is : java.io.
jsp excel code - JSP-Servlet
jsp excel code  hi how to store html form data into excel sheet by using jsp? and repeat this process continuously for entire sheet
JSP/Servlet to read and update Excel
JSP/Servlet to read and update Excel  Hi Team, My requirement is based upon my input(name) value via one jsp, the program(jsp/servlet) should fetch all the column values which is related to my input(name) from Excel(.xls
Reading a xml file - JSP-Servlet
Reading a xml file  how to read a xml file using jsp and then i have to retrive a data from that file use it in code?  Hi Friend, Please visit the following link: http://www.roseindia.net/jsp/parsing-xml.shtml
Excel - JSP-Servlet
Excel  How to export data from jsp to excel sheet. I am using struts1.2 in my application.  Hi friend, Code to data from Jsp to excel...: "success.jsp" For more information on excel sheet Using JSP visit
excel uploading in jsp
excel uploading in jsp  could you provide the source code for: 1)have to upload an empty excel sheet at client side i.e if client clicks an excel icon an empty excel sheet should open 2)when they fill data in that sheet and click
reading dropdown values from properties file in jsp
reading dropdown values from properties file in jsp  reading dropdown values from properties file in jsp
jsp excel code - JSP-Servlet
jsp excel code  Hi how to insert form data into excel file using jsp?  Hi Friend, Try the following code: 1)register.jsp: Registration Form First Name: Last Name: User Name: Password
Reading a xml file - JSP-Servlet
Reading a xml file  Thanks for ur answer sir but problem is that i have to do a reading a xml file of a employee record and then i have to use a employee details to send mail to those employees how to do i sir please help me
jsp data in excel - JSP-Servlet
and this query data has come from beans and using beans i put it in excel jsp in table...jsp data in excel  i have create jsp page which has button for excel.this calls jsp which contains code which has and then code for present data
export to excel - JSP-Servlet
export to excel  Hi this is priti. I need a help. What is my question is i have a report page here i need a button cllaed "Export to excel". After clicking the button all the values from the jsp page will save to a excel file
 

 

 

DMCA.com