![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX and Linux Applications Discuss UNIX and Linux software applications. This includes SQL, Databases, Middleware, MOM, SOA, EDA, CEP, BI, BPM and similar topics. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to differentiate two tar files | siri_14 | Shell Programming and Scripting | 7 | 04-07-2009 04:01 PM |
| Please help Question about Excel Files and Unix | arnab1978 | UNIX for Dummies Questions & Answers | 2 | 04-02-2009 02:54 AM |
| Multiple excel files processing on unix | ucode_2482 | UNIX for Dummies Questions & Answers | 3 | 02-26-2009 04:02 PM |
| PERL: Split Excel Workbook to Indiv Excel files | sandeep78 | Shell Programming and Scripting | 2 | 09-25-2008 08:21 AM |
| Exporting files from unix to Excel sheet | bishweshwar | UNIX for Advanced & Expert Users | 3 | 03-21-2007 04:41 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
|
|
||||
|
Hi,
I want to differentiate between a MS Word and Excel file in Unix (not by extension). The condition which we are currently checking for is the pattern "\320\317\021\340" within first 40 bytes of the file. However this format is same in all MS Office files. Can somebody tell me any special characters which we can check which will differentiate between MS Word and MS Excel file. Regards, Rajan |
|
||||
|
Excel files are BIFF format files - they don't have any special 'identifying' string.
Attached is the WORD binary file format. Neither is very helpful. You can try Wotsit.org for more details. AFAIK windows actually uses the extension to determine what app to to use to open XLS and DOC files. |
| Bits Awarded / Charged to jim mcnamara for this Post | |||
| Date | User | Comment | Amount |
| 05-27-2009 | Neo | Excellent reply. | 20,000 |
|
|||||
|
Hm... I just noticed that the 'file' utility does not make difference between Excel files and Word files - both are presented as "Microsoft Office Document". I'm out of suggestions but relying on the file's extension can also work, you can just warn the users to pay attention on file's names and especially extensions.
|
![]() |
| Bookmarks |
| Tags |
| word excel unix |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|