Java

Moderators: zibadian
Number of threads: 7836
Number of posts: 18235

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Uploading an excel or csv file into the server Posted by Leelya on 15 Mar 2007 at 8:00 PM
Hi ppl,

My problem is i need to upload an excel or csv file into the server. Dat is working perfectly, but while uploading if the file consists of some non printable characters like \n,\r,\t , it should scrubb off these characters and upload it into the server. How to scrubb these values and send it to the server.
I'm using Eclipse framework. Coding in java...
Anbody can post the code here??
Report
Re: Uploading an excel or csv file into the server Posted by zibadian on 15 Mar 2007 at 9:51 PM
: Hi ppl,
:
: My problem is i need to upload an excel or csv file into the server. Dat is working perfectly, but while uploading if the file consists of some non printable characters like \n,\r,\t , it should scrubb off these characters and upload it into the server. How to scrubb these values and send it to the server.
: I'm using Eclipse framework. Coding in java...
: Anbody can post the code here??
:
First the client should read the file and do a global replace to an empty substring of all the characters you don't want to include. Then it should write that data into a temporary file. Finally it can upload that file to the server, while giving it the original name.
Beware: In case of most files this will corrupt the file, making it unreadable by programs.
Report
Re: Uploading an excel or csv file into the server Posted by Leelya on 28 Mar 2007 at 4:52 AM
: : Hi ppl,
: :
: : My problem is i need to upload an excel or csv file into the server. Dat is working perfectly, but while uploading if the file consists of some non printable characters like \n,\r,\t , it should scrubb off these characters and upload it into the server. How to scrubb these values and send it to the server.
: : I'm using Eclipse framework. Coding in java...
: : Anbody can post the code here??
: :
: First the client should read the file and do a global replace to an empty substring of all the characters you don't want to include. Then it should write that data into a temporary file. Finally it can upload that file to the server, while giving it the original name.
: Beware: In case of most files this will corrupt the file, making it unreadable by programs.
:


I tried everything dat is possible and to my knowledge, but i'm not able to resolve this issue. Can anyone help me with the code? How to find the \n,\r characters in the excel file?? Clarify

Report
Re: Uploading an excel or csv file into the server Posted by zibadian on 28 Mar 2007 at 5:59 AM
: : : Hi ppl,
: : :
: : : My problem is i need to upload an excel or csv file into the server. Dat is working perfectly, but while uploading if the file consists of some non printable characters like \n,\r,\t , it should scrubb off these characters and upload it into the server. How to scrubb these values and send it to the server.
: : : I'm using Eclipse framework. Coding in java...
: : : Anbody can post the code here??
: : :
: : First the client should read the file and do a global replace to an empty substring of all the characters you don't want to include. Then it should write that data into a temporary file. Finally it can upload that file to the server, while giving it the original name.
: : Beware: In case of most files this will corrupt the file, making it unreadable by programs.
: :
:
:
: I tried everything dat is possible and to my knowledge, but i'm not able to resolve this issue. Can anyone help me with the code? How to find the \n,\r characters in the excel file?? Clarify
:
:
The code is dependant on the storage of the file. For a string you can use the String.indexOf(string, int) or String.replace(char, char) method. For an array of bytes/char you need to use a for-loop to loop through all the elements. A Collection<Character> based storage can use the "foreach"-statement.
Report
Re: Uploading an excel file into the server Posted by kondru on 10 Apr 2007 at 7:24 AM
: : Hi Guys,
: :
: : My problem is i need to upload an excel file into the server in a temparary location. My jsp page has two input fileds where it taks two excel sheets. when i click the submit button the data will store in temp location in the server( i am using weblogic server).i dont know how to store the file content into the server.it has to read the file content. when i retriving the data from the server( file content in the temp location) again we have to display the content into the excel file.
: : I'm using Eclipse framework. Coding in java...
: : Anbody can post the code here ASAP??
: :
: First the client should read the file. Then it should write that data into a temporary file. Finally it can upload that file to the server, while giving it the original name.




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.