Click here to get back home

Win32::OLE::Const 'Microsoft Excel' - sort & freeze pane

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Win32::OLE::Const 'Microsoft Excel' - sort & freeze pane Slickuser 04-30-2008
Posted by Slickuser on April 30, 2008, 12:48 am
Please log in for more thread options
I would like to sort column A by descending order and other columns to
sort as well.

I used this code and it's doesn't work and I do have Sheet1 in my
workbook.
$CurrentSheet = $Workbook->Worksheets("Sheet1");
        $RangeA = $CurrentSheet->Range("A1");
        $RangeB = $CurrentSheet->Range("A20");
        $Excel->Selection->Sort({
                                Key1 => $RangeA,
                                Order1 => xlDescending,
                                Key2 => $RangeB
                                });

I also want to freeze row 2 but this doesn't work as well.

$Excel->Rows("2")->Select; or $Excel->Rows("2:2")->Select;
$Excel->ActiveWindow-> = "True";

Any help? thanks a lot

Similar ThreadsPosted
Microsoft Access & Win32::Ole October 28, 2005, 4:03 pm
XP, Perl, Win32::ODBC, Microsoft Access 2002 SP3, & Chinese characters January 22, 2008, 4:18 pm
Everything but the column: win32::OLE Excel fun June 7, 2006, 9:07 pm
Microsoft SQL Server 2000 perl module November 11, 2004, 2:12 am
[ANN] Sort::Key 0.02 April 28, 2005, 11:02 am
ANNOUNCE: Sort::Maker .02 September 2, 2004, 5:09 am
Sort::Maker : anonymous sub is compiled outside of my module December 5, 2006, 8:25 am
Accomodate for poor db design using Sort::Maker? December 9, 2006, 12:48 am
Sort::Maker: style => 'plain' difficulty December 14, 2006, 4:35 am
Help Perl and Excel August 16, 2006, 9:25 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap