#!/usr/bin/perl -w
use encoding 'UTF-8', STDIN =>'UTF-8', STDOUT =>'UTF-8';
use strict;
use Win32::OLE qw(in with);
use Win32::OLE::Const 'Microsoft Excel';
$Win32::OLE::Warn = 3;
#define some parameters
my $LogFilePath="E:/PickUpString/Change Log.xls";
my $excelRowStart=722;
my $excelRowEnd=773;
my $excelCol=2;
my $excelSheet=1;
my $rcFile="legacy";
my $rcPath="F:/RC/NewRC/";
my $rcOldPath="F:/RC/OldRC/";
#end define
my $Excel = Win32::OLE->GetActiveObject('Excel.Application')
|| Win32::OLE->new('Excel.Application', 'Quit');
my $Book = $Excel->Workbooks->Open($LogFilePath);
my $Sheet = $Book->Worksheets($excelSheet);
my $stringId="";
foreach my $row ($excelRowStart..$excelRowEnd)
{
$stringId=GetStringID($Sheet->Cells($row,$excelCol)->{'Value'},"${rcPath}${rcFile}.rid");
$Sheet->Cells($row,$excelCol+1)->{'Value'}=GetCaption($stringId,
"${rcOldPath}(SChinese)${rcFile}.rc");
$Sheet->Cells($row,$excelCol+2)->{'Value'}=GetCaption($stringId,
"${rcPath}(SChinese)${rcFile}.rc");
$Sheet->Cells($row,$excelCol+3)->{'Value'}=GetCaption($stringId,
"${rcPath}${rcFile}.rc");
}
$Book->Close;
sub GetStringID
{
my ($id,$filePath)=@_;
my $strValue;
open(FILE,$filePath) || die "$filePath not exists" ;