WriteExcel module, reopening a file

Discussion in 'Perl Misc' started by dn.perl@gmail.com, Dec 21, 2007.

  1. Guest

    I create an excel file 'myfile.xls' using WriteExcel module. It has a
    tab named 'Name1', and its first (say) 10 rows have some data.

    I would like to reopen this sheet for over/writing, and write a string
    'new string' to its cell (10, 1). Or overwrite cell (2,2) with string
    'new string'.

    Now I can open a new excel sheet for writing, parse the old file cell
    by cell, copy each cell to the new file's sheet(s), and add a new
    string to a 'new' cell, and overwrite a copied cell, and then rename
    the new sheet as 'myfile.xls'. But I am interested in knowing whether
    the module WriteExcel (or a Win32 module) allows me to reopen an
    existing excel file for over/writing.

    TIA.
    , Dec 21, 2007
    #1
    1. Advertising

  2. <> wrote:
    >
    > I create an excel file 'myfile.xls' using WriteExcel module.



    > I would like to reopen this sheet for over/writing, and write a string
    > 'new string' to its cell (10, 1). Or overwrite cell (2,2) with string
    > 'new string'.


    > But I am interested in knowing whether
    > the module WriteExcel (or a Win32 module) allows me to reopen an
    > existing excel file for over/writing.



    Have you read the documentation for the module that you are using?

    This module cannot be used to write to an existing Excel file.


    When I needed to do a similar thing at work[1], the only solution I
    could find was to use the POI Java library.

    http://poi.apache.org/


    After a few days of Java programming, I needed to lick dirt to
    get the bad taste out of my mouth. :)



    [1] And it needed to run on a Linux web server, so win32 modules were not an option.

    --
    Tad McClellan
    email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
    Tad J McClellan, Dec 21, 2007
    #2
    1. Advertising

  3. Guest

    On Dec 21, 6:33 am, "" <> wrote:
    > I create an excel file 'myfile.xls' usingWriteExcelmodule. It has a
    > tab named 'Name1', and its first (say) 10 rows have some data.
    >
    > I would like to reopen this sheet for over/writing, and write a string
    > 'new string' to its cell (10, 1). Or overwrite cell (2,2) with string
    > 'new string'.



    Hi,

    See the following Spreadsheet::WriteExcel FAQ. "How do I update an
    existing Excel file":

    http://groups.google.com/group/spreadsheet-writeexcel/browse_frm/thread/15e131d2f5d012b4

    Note you will have to patch the latest version of SaveParser to get it
    to work (see link below) or put a "use Spreadsheet::parseExcel;" at
    the top of your program.

    http://rt.cpan.org/Public/Bug/Display.html?id=31380

    John.
    --
    , Dec 21, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tomas Mikula
    Replies:
    7
    Views:
    411
    Andreas Leitgeb
    Nov 15, 2007
  2. Zev Blut
    Replies:
    3
    Views:
    162
    trans. (T. Onoma)
    Nov 24, 2004
  3. Logan Capaldo
    Replies:
    0
    Views:
    125
    Logan Capaldo
    Aug 13, 2006
  4. Replies:
    5
    Views:
    304
    smallpond
    Mar 10, 2009
  5. Replies:
    2
    Views:
    97
    Jim Gibson
    Jul 8, 2009
Loading...

Share This Page