in reply to writing Arabic text in Excel

First of all, you should instruct Win32::OLE to use unicode, with the following 2 lines:
use Win32::OLE qw(CP_UTF8); Win32::OLE->Option(CP=>CP_UTF8);
Secondly, it is not good to use obsoleted Unicode::Map module, it was used when Unicode in Perl was weak, now you should go other, the robust way, of perl5.8.x

thirdly, boxes are probably missing characters in a given font.

BR,
Vadim.

Replies are listed 'Best First'.
Re^2: writing Arabic text in Excel
by pg09 (Acolyte) on Apr 05, 2006 at 23:00 UTC
    Thanks, this helped! The Arabic text gets printed fine, but the English language symbols such as (), [], ..., etc. show up in the inappropriate places. That is, these symbols show up in the left to right format (as in English) rather than right to left (as in Arabic). Following is my code:
    use Win32::OLE qw(CP_UTF8); Win32::OLE->Option(CP=>CP_UTF8); use Win32::OLE::Const 'Microsoft Word'; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new("word.xls"); my $worksheet = $workbook->addworksheet(); my $word = Win32::OLE->new('Word.Application', 'Quit'); my $doc = $word->Documents->Open("C:\\file.doc"); my $string = $doc->Words->Item(1)->Text; $worksheet->write(0, 0, $string);
      I believe your problem is in right-to-left and left-to-right mixed text...
      I can't advice many here, but I believe Word is quite good at this, so it probably deserves respect on this :):):)