How to read a Word file and parse data
Posted by Ramki (Ramki), 14 August 2007Hi graham,
My query is as follows,
i have one word document , using perl i want open and parse some data from that word document, how to do that
Posted by KevinAD (KevinAD), 14 August 2007May be something useful on cpan:
Posted by admin (Graham Ellis), 14 August 2007We have an example on our web site - see http://www.wellho.net/resources/ex.php4?item=p214/msword. This uses the standard modules that come with ActiveState Perl.
Posted by Ramki (Ramki), 16 August 2007on 08/14/07 at 23:10:11, Graham Ellis wrote:
Thank you Graham,
i have run the code that is given in the ite that havebeen refererd by you,
when i run the program now i have been come up with the enw problem of " can't call methods on Paragraph on the undefined value at line 12"
Can you give me solution for that error
Posted by admin (Graham Ellis), 16 August 2007It will come up with an error like that if you don't give it a valid word document file name when you're asked, I think.
Posted by KevinAD (KevinAD), 16 August 2007Yes, that looks to be the situation. When creating the object some error checking might be helpful:
Question: How come the sample code is not written using the strict pragma?
Posted by admin (Graham Ellis), 17 August 2007on 08/16/07 at 20:19:17, KevinAD wrote:
Most of our sample code accompanies our training courses and is written to show the minimum functional elements necessary to perform a task. So that means that there's little or no validation and checking of all sorts in many of them. You did spot a "user beware" paragraph in the conditions of use on the example, didn't you?
The strict pragma is important in any files that you might use or require from within other programs, of course ... and we do use it, show you why and stress its importance when you're with us on your course.
Posted by KevinAD (KevinAD), 17 August 2007hehehe... I missed the "user beware" disclaimer.
Your explanation makes sense.
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: email@example.com • WEB: http://www.wellho.net • SKYPE: wellho