Unzipping a file in Solaris - Issue with xls file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Unzipping a file in Solaris - Issue with xls file
# 1  
Old 08-26-2010
MySQL Unzipping a file in Solaris - Issue with xls file

Hi,

I have an excel file generated by system in windows. I am zipping it, transfering to unix and unzipping there. But i'm getting below output while unzipping.

Code:
$ /usr/bin/unzip -a 123.zip -d .
Archive: 123.zip
inflating: ./123/Index.xls [text]

When i copy this unzipped xls file to windows and open it, i couldn't see the properties of the file. Properties getting added to start of the file and i could see them alongwith some junk characters, when i open the file. And also complete first line is getting appended in a single cell.

Code:
ࡱ>  \p<author> Ba==x<L;$8X@"1Arial1Arial1Arial1Arial1Arial1 Arial"$"#,##0_);\("$"#,##0\)!"$"#,##0_);[Red]\("$"#,##0\)""$"#,##0.00_);\("$"#,##0.00\)'""$"#,##0.00_);[Red]\("$"#,##0.00\)7*2_("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"_);_(@_).))_(* #,##0_);_(* \(#,##0\);_(* "-"_);_(@_)?,:_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)6+1_(* #,##0.00_);_(* \(#,##0.00\);_(* "-"??_);_(@_)                                +  )  ,  *         `...ASheet1...!Sheet2..."Sheet3"  field1field2field3field4

I followed the below procedure.
1. Transfer the same zip file (without unzipping in unix) from Unix to Windows
2. Unzip it in Windows (I could see .xls file without any junk chars)
3. Manually create an xls file by copy-pasting the contents of the unzipped xls file
4. Zip it in Windows
5. Transfer the zip file to Unix
6. Unzip the file in Unix

Now the unzip output is different and copy back to windows and see, there are no junk charcters and file properties are shown properly.
Code:
$ /usr/bin/unzip -a 123.zip -d .
Archive: 123.zip
inflating: ./123/Index.xls [binary]

Please advise what could be the issue, is it an issue while auto-generation of xls file by the system or it is while unzipping?

Thanks,
Ajay

---------- Post updated 08-26-10 at 09:50 AM ---------- Previous update was 08-25-10 at 10:34 AM ----------

Hi team,

I got the solution. It is working fine if i do not use -a flag while unzipping.

-a is for treating it as excel file.

Thanks,
Ajay
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Convert Excel File (xls) to tab delimited text file on AIX

Hi i have a problem in my job i try to convert an excel file (xls extention) to text file (tab delimited), but no result with this comand cat xxx.xls > xxx.txt Do you have eny idea? PS: sorry for my english Thanks!! (4 Replies)
Discussion started by: frisso
4 Replies

2. UNIX for Dummies Questions & Answers

Print Only File Name in Zip File With out Unzipping It

How i print just only the file name in the zip file. unzip -l AAC_20130930_v13.xml.zip Archive: AAC_20130930_v13.xml.zip Length Date Time Name -------- ---- ---- ---- 62665745 11-19-13 10:43 AAC_20130930_v13.xml -------- ------- 62665745 ... (2 Replies)
Discussion started by: Ariean
2 Replies

3. Windows & DOS: Issues & Discussions

Issue: Unzipping file containing files/folders with a similar name

Hi, I have a zip file created on a Linxux server that I need to extract on a Windows machine... The zip file containing folders with the same name but they each have a different case, one if camel case and the other is just capitalised. When I extract using 7zip, I get prompted if I want to... (3 Replies)
Discussion started by: muay_tb
3 Replies

4. Shell Programming and Scripting

How to remove new line in file after unzipping the file?

I wrote my unix archive script to move the zip files from unix input folder to windows folder,the zip files got successful transfered but while iam unzipping them in windows folder a new line is getting appended in my file.. how can i remove that new line..? (6 Replies)
Discussion started by: hemanthsaikumar
6 Replies

5. UNIX for Dummies Questions & Answers

How to know the Original size of the file without unzipping the File?

Hi, I don't have enough space on my Unix Box. So, I can't unzip the file and check the size of the file. So, I need to know, Is there any command, to check, how much the unzipped file takes after unzipping. Thanks in Advance. (4 Replies)
Discussion started by: Siva Sankar
4 Replies

6. UNIX for Dummies Questions & Answers

view gzipped files with name file.gz.$DATE on a Solaris box (without unzipping first)

Hi Howto view gzipped files with name file.gz.$DATE on a Solaris box (without unzipping first) $ ls -lrt total 4477 -rwxrwxr-x 1 oracle dba 569745 Apr 4 19:45 4_person2profileCon.txt.gz.04.04.11* -rwxrwxr-x 1 oracle dba 3783 Apr 4 19:45... (4 Replies)
Discussion started by: slashdotweenie
4 Replies

7. UNIX for Advanced & Expert Users

Converting .csv file into .xls file and send it to inbox

Hi All, I wrote a script to extract data from Oracle DB and place it in a text file , and I have coverted .txt file into comma seperated .csv file and I sent it to my mail box . I can get .xls file in my inbox.I am getting all data in same column and in different rows , without column... (1 Reply)
Discussion started by: krthkmuthu
1 Replies

8. Shell Programming and Scripting

converting xls file to txt file and xls to csv

I need to convert an excel file into a text file and an excel file into a CSV file.. any code to do that is appreciated thanks (6 Replies)
Discussion started by: bandar007
6 Replies

9. Shell Programming and Scripting

How to search a pattern inside a zipped file ie (.gz file) with out unzipping it

How to search a pattern inside a zipped file ie (.gz file) with out unzipping it? using grep command.. Bit urgent.. pls..help me (2 Replies)
Discussion started by: senraj01
2 Replies

10. UNIX for Dummies Questions & Answers

unzipping .zip file on HP and Solaris

I am transferring a large .zip file (20 GB) from an NT server to HP-UX and Solaris servers. Originally I tried to use info-zip's unzip, but I found out pretty quickly that it does not support files over 4GB. Any suggestions on how to work around this problem? Different decompression utility?... (9 Replies)
Discussion started by: dangral
9 Replies
Login or Register to Ask a Question