I am trying to process an Excel file with Chinese characters in one of the columns and then write out those characters to a file. I have reduced the code as much as I know how. The output file has "? ?" from "李 氏" input. I am fairly new to perl and would appreciate help. Thank you for your time.
#!/usr/bin/perl
use warnings;
use strict;
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Excel';
use Win32::OLE qw(in with);
use utf8;
use Encode;
my $editOWS_file = 'C:\\Users\\lordsll\\Downloads\\Chinese_output.out'
+;
open OUT1, ">:encoding(UTF-8)","$editOWS_file" or die "Can't write on
+file $editOWS_file: $!\n";
my $Excel = Win32::OLE->new("Excel.Application");
$Excel->{Visible} = 1;
my $Book = $Excel->Workbooks->Open("C:\\Users\\LordsLL\\Downloads\\pro
+blem_sample.xlsx");
$Excel->Worksheets(1)->Activate();
my $cell = $Excel->Worksheets(1)->Range("A1")->{Value};
print OUT1 "$cell\n";