wood burning stoves 2.0*
The moose likes Linux / UNIX and the fly likes Downloading excel file using shell script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Downloading excel file using shell script" Watch "Downloading excel file using shell script" New topic
Author

Downloading excel file using shell script

Rashmee Kulkarni
Greenhorn

Joined: Mar 27, 2010
Posts: 19
Hi..
I want to download excel file from one website using shell script and save it.
Right now I am using following command and file is getting downloaded.

lynx -source http://www.xyz.com/example.xls > example.xls
(not the actual site...used as example)

But if I transfer the file on windows and try to view the contents I am getting "Excel has unreadable data" message
and even if after recovering it not getting the data.

Please help...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41127
    
  45
I think there are Windows versions of curl and wget that should be able to do this.


Ping & DNS - my free Android networking tools app
Rashmee Kulkarni
Greenhorn

Joined: Mar 27, 2010
Posts: 19
Hi Ulf,
I have tried to use wget but getting same problem..
Rashmee Kulkarni
Greenhorn

Joined: Mar 27, 2010
Posts: 19
Hi All,
I used binary mode of FTP to transfer file to windows..
and it worked
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
Yes.

You should use binary mode, otherwise when you transfer the file to a windows environment, there is good possibly carriage returns<cr> will be added to the contents of the file.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Downloading excel file using shell script
 
Similar Threads
How to Open Excel file from JSP page.
database access in shell script
IReports
Error Running shell script from external application
Problem while opening excel sheet from jsp