开发者

Aspose Cells Numeric Formatting With Processed Datasource

I am new to Aspose Cells, having inherited a project that uses it. A requirement was added that numeric values in cells be actual num开发者_JAVA技巧bers - they were formerly text.

So, I changed calls in the code that called Cell.PutValue() to use the overloaded version of the method that takes the bool isConverted. Passing a value of "true" in that parameter solved the problem for these instances.

However, in other places in the code, we export data from our website into a spreadsheet by using ExcelDesigner.SetDataSource() and ExcelDesigner.Process(). The spreadsheets resulting from this approach also have numbers stored in cells as text.

How can I convert the text to numbers in this case, as I did with the PutValue() case?


It turns out that Aspose uses something called "Smart Markers", which are directives embedded into the cells of template spreadsheets that Aspose Cells uses to decide how data should be inserted into them.

Smart Markers have optional "parameters", which are parenthesized, comma-separated modifiers giving further processing instructions. The "(numeric)" directive achieved the result that I was looking for.


You may also post a query directly in Aspose.Cells forums, in case you need any further assistance. As those forums are monitored by our support and development teams.

Disclosure: I work as developer evangelist at Aspose.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜