Hi all,
Am trying to export Some data to excel using
excel buffer. I cannot find out how to export a formula. Can anyone give me some code lines to do this ?
I already searched Mibuso for this matter, this question was already posted but i can't find any real answer.
To be a little bit clearer am trying to export an invoice line's
"unit price" into excel and calculate the
LCY price by multiplying the line's
unit price by the Header's
Currency Factor
Am using the following code to export data as it is :
ExcelBuf.AddColumn("Sales Invoice Line"."Unit Price" ,FALSE,'',TRUE,FALSE,TRUE,'');
Another solution would be to make Nav do all the job, but i'd like to see Excel in action
Comments
SalesInvHeader.GET("Document No.");
var_LCYPrice := SalesInvLine."Unit Price" * SalesInvHeader."Currency Factor";
(or whatever the formula is)
You are going to have all the info needed to export available already so 1 more calculation isn't such a big deal.
Then export the var_LCYPrice.
http://www.BiloBeauty.com
http://www.autismspeaks.org
Check out a little something I have managed to whip up...
(Sure you may spend a little more time creating some code but the overall efficiency and performance is unequivocal)
http://www.mibuso.com/forum/viewtopic.php?t=26657
[One of these days I will create a codeunit with all the user friendly procedures to create a fast Excel export]