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.
$ /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.
��ࡱ�>�� ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ��a������\p<author> B�a�=���=x<L;$8X@"��1���Arial1���Arial1���Arial1���Arial1����Arial1 ��Arial"$"#,##0_);\("$"#,##0\)!"$"#,##0_);[Red]\("$"#,##0\)"a"$"#,##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\);_(* "-"??_);_(@_)��� � ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� � � �+�� �� �)�� �� �,�� �� �*�� �� � �� �� � � � � �����������a�������`...ASheet1...�!Sheet2...�"Sheet3���"�� � �field1field2efield3field4
I followed the below procedure.
- Transfer the same zip file (without unzipping in unix) from Unix to Windows
- Unzip it in Windows (I could see .xls file without any junk chars)
- Manually create an xls file by copy-pasting the contents of the unzipped xls file
- Zip it in Windows
- Transfer the zip file to Unix
- 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.
$ /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