Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

does Spreadsheet::WriteExcel only create new files?

by trickyq (Acolyte)
on Jun 06, 2012 at 19:28 UTC ( #974819=perlquestion: print w/ replies, xml ) Need Help??
trickyq has asked for the wisdom of the Perl Monks concerning the following question:

Does spreadsheet::writeExcel only create new files or can it open and write to (add) to an existing spreadsheet? I dont want to waste any more time with this module if its the wrong one

Update

im learning, so I ask questions and if the answers worked, then I wouldnt be asking anymore. Why dont you have a beginners section or somewhere where people who are learning can ask stupid questions and not be called an idiot for it.

im done anyway

Comment on does Spreadsheet::WriteExcel only create new files?
Re: does Spreadsheet::WriteExcel only create new files?
by afoken (Parson) on Jun 06, 2012 at 19:44 UTC
Re: does Spreadsheet::WriteExcel only create new files?
by ~~David~~ (Hermit) on Jun 06, 2012 at 20:03 UTC
    As I mentioned previously, use Win32::OLE for writing to an existing Excel file.

      can you show me some syntax, I am terrible with the cpan docs. I need to see what it looks like, or could you refer me to a specific place where I can read how to specifically write to an excel file. Even if its real general, I can figure it out. I just read the Win32::OLE module docs for a while and then tried some stuff. I cant figure out how to tell it to open the existing workbook and write to it.

        Are you on a Windows system that has Excel and Perl installed? If not, you're not going to be able to use Win32::OLE.

        If you are on a Windows system with Perl and Excel, you can check out Using Win32::OLE and Excel - Tips and Tricks or do a super search on "excel win32 ole" to get started on using Win32::OLE to control Excel.

Re: does Spreadsheet::WriteExcel only create new files?
by dasgar (Deacon) on Jun 06, 2012 at 20:41 UTC

    This was answered in your earlier thread How Do I Write an Excel Spreadsheet using Spreadsheet::XLSX.

    Since you seem to struggle to understand what others keep telling you, let me see if I can try to explain this as simply as possible.

    For .xls files, you can use Spreadsheet::ParseExcel to only read the Excel file and you can use Spreadsheet::WriteExcel to only write out an Excel file. Similarly for .xlsx files, you can use Spreadsheet::XLSX for reading only and use Excel::Writer::XLSX for only writing out an .xlsx file.

    To modify an existing Excel spreadsheet, you have to use one module to read in the file and another module to write out the file. If you happen to be on Windows and have Excel installed, you can use Win32::OLE for both reading and writing. Otherwise, as far as I know, you have to use a combination of two modules to modify an existing Excel spreadsheet.

Re: does Spreadsheet::WriteExcel only create new files?
by chromatic (Archbishop) on Jun 06, 2012 at 20:58 UTC

    What problems do you have with the answers already given to you in several replies over the past couple of days? What part of the solution I suggested to you earlier didn't work?


    Improve your skills with Modern Perl: the free book.

Re: does Spreadsheet::WriteExcel only create new files?
by Anonymous Monk on Jun 06, 2012 at 21:21 UTC
    somebody please ban this idiot
Re: does Spreadsheet::WriteExcel only create new files?
by marto (Bishop) on Jun 07, 2012 at 08:39 UTC

    im learning, so I ask questions and if the answers worked, then I wouldnt be asking anymore. Why dont you have a beginners section or somewhere where people who are learning can ask stupid questions and not be called an idiot for it.

    The rule of thumb is to ignore the trolls. Feeding them is ill advised at best, the majority of the time there is nothing positive to take from a troll post.

    Seekers of Perl Wisdom is the section for all questions relating to Perl, beginner or otherwise. Posting the same (or slightly reworded) question which has already been answered isn't a constructive use of anybody's time.

Re: does Spreadsheet::WriteExcel only create new files?
by dasgar (Deacon) on Jun 07, 2012 at 16:26 UTC
    im learning, so I ask questions and if the answers worked, then I wouldnt be asking anymore. Why dont you have a beginners section or somewhere where people who are learning can ask stupid questions and not be called an idiot for it.

    First, I would suggest ignoring the idiot who called you an idiot. I personally tend to ignore derogatory or personal attack type posts from "Anonymous Monk".

    Secondly, as some of us have pointed out, it seems like you're asking the same question over and over again while ignoring the answers that folks are providing. Flip the situation around. If I asked you "what's 2 plus 2" about 20 times, at what point would you lose your patience with me asking the same question over and over again while ignoring your answers?

    I've taken the time to try to go look at all of your posts to try to get an understanding of where you're coming from. I'm not trying to be mean in any way with what I'm about to say, but I'm getting the impression from your posts that you are seriously struggling to understand the basics (accessing elements of hashes/arrays, reading module documentation, etc.). If that's true, then I can clearly see how a lot of the answers folks have offered would make as much sense as gibberish and why you're struggling so much with this Excel spreadsheet stuff.

    Here's my suggestion. Take a step back to take the time to go back and learn/relearn the basics to build up your skills and knowledge to the point where you're able to tackle this spreadsheet stuff. In your very first post, you started off by saying that you're "an old perl user" that has "been out of the loop for ten years or so". Ok, so it looks like you built up some rust from not using your Perl knowledge and skills for a while. But shaking of that rust usually takes much less time and effort than trying to learn things the first time around.

    Again, I'm not trying to be mean. I'm genuinely trying to understand where you're at and genuinely trying to offer you the assistance that you need and that will give you the most benefit.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://974819]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2014-12-22 07:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (112 votes), past polls