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

How Do I Import and Export Data Between Excel and Xmath?

Primary Software: MATRIXx
Primary Software Version: 7.0
Primary Software Fixed Version: N/A
Secondary Software:

Problem: How can I export data from Xmath to Excel? How can I import data from Excel to Xmath?

Solution: The Xmath functions read_sv and write_sv can be used to import and export separated variable files from Xmath. A separated variable file is a text file where the variables are separated by commas, tabs or spaces.

For Example:

Bringing data from Excel into Xmath:
1. Save an Excel workspace as Text (Tab delimited) or CSV (Comma delimited)
2. Read the data into an Xmath
a = read_sv("data.txt")

Bringing data from Xmath into Excel.
  1. Using a tab delimited file
    a = [1,2,3; 4,5,6];
    write_sv("test.txt", a, ""t")


  2. Using comma delimited files
    a = [1,2,3; 4,5,6];
    write_sv("test.csv", a, ",")

If the extension .csv is used, Excel assumes the files is a comma separated variable file. For other extensions Excel will prompt for how to convert the file.

Related Links:

Attachments:





Report Date: 01/13/2003
Last Updated: 02/07/2003
Document ID: 2TCFI7OH

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