Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 2nd, 2013, 09:50 AM
Registered User
 
Join Date: Jan 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Summing large numbers in xslt

Im having a problem summing 2 large numbers in xslt..
Here is a snippet..

<Cell ss:StyleID="s27"><Data ss:Type="String">Grand Total</Data></Cell>
<Cell ss:Index="7" ss:StyleID="s33"><Data ss:Type="Number"><xsl:value-of select="sum(/*/MorningStarFundReport/CUSIP_Market_Value)"/></Data></Cell>
<Cell ss:StyleID="s35" ss:Formula="=SUBTOTAL(9,R[-3]C:R[-2]C)"></Cell>

This works great when the values are
999999.9999 or lower, but any number higher than that does not work.
I am exporting this to an Excel spreadsheet..
Please note that the SUBTOTAL function works just fine

Ive tried to change formatting for the cell, I have also tried to assign the sum to a varibale & work with it..to no avail

Any help out there?

Thanks
 
Old January 2nd, 2013, 01:41 PM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

Consider to post minimal but complete samples of an input document, a stylesheet, the output you want, the one you get, together with information about the XSLT processor used.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog
 
Old January 2nd, 2013, 02:01 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

As Martin says, we need more information.

Also: never say in a posting that something "doesn't work" without saying how it fails.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old January 4th, 2013, 02:37 AM
Registered User
 
Join Date: Dec 2012
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default

we need more information
 
Old January 5th, 2013, 11:53 AM
Registered User
 
Join Date: Jan 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, sorry I didnt include more info..However I did find a workaround





Similar Threads
Thread Thread Starter Forum Replies Last Post
Split large XML to Smaller XML using XSLT chilly XSLT 30 March 8th, 2013 09:43 AM
XSLT - row numbers which met criteria lonas XSLT 5 June 21st, 2012 04:46 AM
how to generate random numbers in xslt anboss XSLT 3 July 23rd, 2008 09:10 AM
Summing values swwallace XSLT 4 March 4th, 2006 12:13 PM
Sum of random numbers in a table with XSLT Tschuri XSLT 0 May 8th, 2005 04:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.