Convert from XML in excel format to Excel XLS file CPAN module
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Convert from XML in excel format to Excel XLS file CPAN module
Hi guys,
I' trying to use "Spreadsheet::WriteExcel::FromXML" to convert xml in excel format to binary xls.
I'm trying to follow and understand simple examples, and once that try with with my real xml files.
The examples I follow from CPAN are here ExcelTemplate and here Spreadsheet-WriteExcel-FromXML
I've installed both modules, Spreadsheet::WriteExcel and Spreadsheet::WriteExcel::FromXML but following
those examples don't work. I receive errors "Must define a title attribute for worksheet!" and
I'm not sure because the example they use has wroksheet name="tester"
Q: If the author's own example doesn't work, that doesn't bode well for you trying to do anything with the module yourself, does it?
A: Yes, I've been trying to get some help in this issue without success so far.
If you can't even get the example code to run, then you're probably not going to have much luck writing your own code with that module.
One other approach, besides contacting the author, is to download the source and try to debug the module itself.
Q: Why not look for a different module?
Or, more to the point, look for TWO different modules:
1) an Excel module (to read and write arbitrary data from your spreadsheet)
2) an XML module (to parse and manipulate any/all data that happens to be XML)?
I got that message in display after execute Perl code.
...
So locate the part of Perl code producing the message. Maybe it's a simple error in the module, or something in your code. I.e. you need to understand what check fails and as a result produces this error message.
One other approach, besides contacting the author, is to download the source and try to debug the module itself.
Well, I'm very beginner in Unix/Bash etc to do that . I would like to write my own code about that really.
Quote:
Originally Posted by paulsm4
1) an Excel module (to read and write arbitrary data from your spreadsheet)
I've made an Excel Macro to convert all xml files in folder(there are few thousands) into xls files, but
I found that Excel needs to open each file to convert it. That action will slow a lot the convertion of all files.
I've been asking Excel Experts in forums and until now I don't have a method in which Excel processes all files without open them, this is an advantage of Unix script, because is not needed to open files to process them, then execution is faster.
Quote:
Originally Posted by paulsm4
2) an XML module (to parse and manipulate any/all data that happens to be XML)?
With help of this forum I've done a shell script to process all those files to reformat into Excel XML format,
but they remain with XML extension, not in original binary Excel format.
So locate the part of Perl code producing the message. Maybe it's a simple error in the module, or something in your code. I.e. you need to understand what check fails and as a result produces this error message.
Hi Sergei,
I found a russian forum that somebody shows a xml sample file that works with the FromXML
module, the sample is below.
I could change title by name within one file in the FromXML.pm module and it works, but If I add more things to
the xml file (still being a very small and simple xml) more errors begin again. I think is really needed from the
author the structure of xml file which will be correctly processed by the module, or discover it for myself, thing that could
take me undefined time I think.
I found a russian forum that somebody shows a xml sample file that works with the FromXML
module, the sample is below.
I could change title by name within one file in the FromXML.pm module and it works, but If I add more things to
the xml file (still being a very small and simple xml) more errors begin again. I think is really needed from the
author the structure of xml file which will be correctly processed by the module, or discover it for myself, thing that could
take me undefined time I think.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.