in reply to Append row into existing excel file

Update: It's the first step that you seem to be missing.

...roboticus
  • Comment on Re: Append row into existing excel file

Replies are listed 'Best First'.
Re^2: Append row into existing excel file
by Anonymous Monk on Apr 04, 2009 at 13:47 UTC
    Thanks roboticus for the help. I am trying to do this operation without renaming the file. I mean without parsing the file, I want to update the excel file. Can you please help with any other alternate solution.

      If you don't want to parse & rewrite it, then you'll want to use Win32::OLE as mentioned by Corion. As you mention in Re^2: Append row into existing excel file, there's no function in Win32::OLE. That's because OLE is just a Microsoft-standard interface for talking to objects (not exactly the same as the objects in OOP, but not terribly dissimilar).

      The general procedure there would be to tell Win32::OLE to create an Excel application object for you, and then tell Excel to do what you want it to do. Note: You can turn on "macro recording" in Excel, and then add the row(s) you want. Then turn macro recording off, and you can then look at the VB code in the macro to see what you need to tell Excel to do.

      If you search around, you'll find plenty of links on 'convert VB to perl' which include some Excel-specific examples in the threads.

      ...roboticus