原創(chuàng)|其它|編輯:郝浩|2012-09-14 11:03:52.000|閱讀 641 次
概述:在我們?nèi)粘5臄?shù)據(jù)表中,經(jīng)常會涉及到金額,PDF文件的數(shù)據(jù)表也不例外,今天我們就來講講如何運(yùn)用Aspose.PDF顯示貨幣符號(如:$¥£€)。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
在我們?nèi)粘5臄?shù)據(jù)表中,經(jīng)常會涉及到金額,PDF文件的數(shù)據(jù)表也不例外,今天我們就來講講如何運(yùn)用Aspose.PDF顯示貨幣符號(如:$¥£€)。
Aspose.Pdf有一個名為TableFormatInfo的類,其中包含了一個名為CurrencySymbol的屬性,使用這個屬性就可以幫助我們輕松實現(xiàn)數(shù)據(jù)貨幣格式的設(shè)置啦。
參考代碼如下:
C#
// Create an object of TableFormatInfo class.
Aspose.Pdf.Generator.TableFormatInfo tfi = new Aspose.Pdf.Generator.TableFormatInfo();
//Sets a string value that indicate currency symbol of money, the default is "$".
tfi.CurrencySymbol = "$";
// Format the table in specified columns and rows with given TableFormatInfo
table.FormatTableWithFormatInfo(tfi,int firstColumn,int firstRow,int maxRows,int maxColumns);
VB.NET
' Create an object of TableFormatInfo class.
Dim tfi As Aspose.Pdf.Generator.TableFormatInfo = New Aspose.Pdf.Generator.TableFormatInfo()
'Sets a string value that indicate currency symbol of money, the default is "$".
tfi.CurrencySymbol = "$"
'Format the table in specified columns and rows with given TableFormatInfo
table.FormatTableWithFormatInfo(tfi,int firstColumn,int firstRow,int maxRows,int maxColumns
代碼運(yùn)行后的效果圖如下:
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自:慧都控件網(wǎng)