Hi, I'm trying to print the text "ID Serviço Vantive" in excel sheet using the following code, but in Excel it is getting displayed as "ID Sevio Vantive". The character 'ç' is getting missed, I know it is because of encoding,decoding of characters but tried few ways to fix it and none of them worked. Can anyone help me how to get rid of this problem?
use Locale::Msgcat; use Number::Localization; use Presentation; use utf8; use Encode ; my $rowCount = 0; my $colCount = 0; my $Field = ""; my $workbook = Excel::Writer::XLSX->new('test.xlsx'); $worksheet = $workbook->add_worksheet(); $worksheet->set_column( 0, 10, 40 ); my $gFmtBold = $workbook->add_format(); $gFmtBold->set_bold(); $gFmtBold->set_size(15); $gFmtBold->set_color('black'); $gFmtBold->set_align('center'); my $normalFmt = $workbook->add_format(); $normalFmt->set_align('center'); my (@outRecord); @outRecord = ("Nome do Produto","ID Serviço Vantive","Motivo","Quantid +ade"); foreach $Field (@outRecord) { $worksheet->set_column($rowCount,$colCount,40); $worksheet->write($rowCount,$colCount,decode('utf8',$Field),$gFm +tBold); $colCount++; }
In reply to Printing portugese text in Excel by raja567
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |