原創|其它|編輯:郝浩|2012-09-14 11:03:52.000|閱讀 641 次
概述:在我們日常的數據表中,經常會涉及到金額,PDF文件的數據表也不例外,今天我們就來講講如何運用Aspose.PDF顯示貨幣符號(如:$¥£€)。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
在我們日常的數據表中,經常會涉及到金額,PDF文件的數據表也不例外,今天我們就來講講如何運用Aspose.PDF顯示貨幣符號(如:$¥£€)。
Aspose.Pdf有一個名為TableFormatInfo的類,其中包含了一個名為CurrencySymbol的屬性,使用這個屬性就可以幫助我們輕松實現數據貨幣格式的設置啦。
參考代碼如下:
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
代碼運行后的效果圖如下:
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:慧都控件網