Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
1 ratings:
 5 out of 5     Rate this Document

Data is Truncated When Creating Excel Graph with Report Generation for MS Office Toolkit

Primary Software: LabVIEW Toolkits>>Report Generation Toolkit for Microsoft Office
Primary Software Version: 1.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem: My data contains very small numbers (less than 10^-6) as well as numbers with 7+ digits of precision, and I want to insert this data into an Excel graph using the Report Generation for Microsoft Office Toolkit. However, when the VI runs, the numbers sent to Excel are truncated or in some cases replaced with zero. Why is this happening and how can I fix it?

Solution: The Report Generation for Microsoft Office Toolkit is configured to transfer data to Excel graphs with a precision of 6 digits (0.000000). This fact explains why values with greater precision get truncated and why values less that 10^-6 get rounded to zero. To fix this dilemma, you will need to go into the Report Generation Toolkit's subVIs and make one modification:
  1. Inside of your LabVIEW directory, navigate through the folders: vi.lib»addons»_office and open "_exclsub.llb".

  2. Inside of the llb, select "Excel_Insert_Chart.vi".

  3. Open the block diagram and scroll to the right until you see the control named "data" that connects to a case structure.

  4. If you follow the "data" control's wire through the case structure you will see the string constant "%f" directly above it. Replace this constant's value with "%.Xf", where "X" corresponds to the number of digits of precision that you would like to use in passing data between LabVIEW and Excel graphs. For example, to send numbers on the order of 10^-9, the constant should be at least "%.9f".

  5. Save and close the VI.


Related Links:

Attachments:





Report Date: 04/28/2005
Last Updated: 04/29/2006
Document ID: 3KRGTNL2

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit