| View previous topic :: View next topic |
| Author |
Message |
sbouchet Newbie

Joined: 11 Jan 2005 Posts: 2 Location: Nantes - France
|
Posted: Tue Jan 11, 2005 7:34 am Post subject: How to check if a file can be open with Writer ? |
|
|
Hi,
I am using OpenOffice to convert text files to .sxw files.
I am able to do so with .doc files, but i would like to do the same with every file supported by Writer.
How can i do that ???
Stephane |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
sbouchet Newbie

Joined: 11 Jan 2005 Posts: 2 Location: Nantes - France
|
Posted: Wed Jan 12, 2005 4:49 am Post subject: |
|
|
Well.
I am using Openoffice with JAVA , and it is a part of a J2EE application.
I try to upload a file via a form, convert this file with OpenOffice to a .sxw file, and then manipulate this file in order to extract it contents.
what i want to do is to use the API in order to know if the file uploaded can be open with OO.. |
|
| Back to top |
|
 |
pitonyak Administrator


Joined: 09 Mar 2004 Posts: 3618 Location: Columbus, Ohio, USA
|
Posted: Wed Jan 12, 2005 7:13 am Post subject: |
|
|
From my book:
| Quote: | | OpenOffice.org has a type-detection mechanism to determine a document’s type when it is loaded. This mechanism has been reliable for the limited number of document types that I deal with daily. Sometimes, however, you must specify the filter name when importing a document. |
Hopefully, the type detection will work with the file names and extensions that are provided. If not, then you will need to manually supply the filter name.
Look at the conversion stuff at: http://oooconv.free.fr/ _________________ --
Andrew Pitonyak
http://www.pitonyak.org/oo.php |
|
| Back to top |
|
 |
|