cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Generate a delimited ASCII file with a data spacer and read it with Excel

PatriceBujard-d
1-Visitor

Generate a delimited ASCII file with a data spacer and read it with Excel

Dear Mathcad Guru's,

I am using the function

array = augment(vect1, vect2, vect3,..) n vectors in total. Each vector has m rows

to create an array of data of m rows and n columns

The data can be positive or negative

Then I write the array with the command

WRITEPRN(file_name) = array

When I want to read the data with Excel, I open it with the Text Import Wizard, using the delimited option and space (or other) in order to read the various columns.

It happens very often that the text Import Wizard doesn't recognise correctly the columns.

One way to avoid this issue would be to introduce a delimitation (like space, ; or else) between the columns.

I need to be able to read the data with Excel, after I generated delimited (?) ASCII file with mathcad

I have also tried

WRITEFILE(file_name,"Excel"):=array

but it seems not to work ! What did I wrong there

Does anyone knows how to solve this issue ?

Thank you for your help

ACCEPTED SOLUTION

Accepted Solutions

Go to "Tools", "Worksheet Options", "Built-in Variables" tab, and increase the column width. That might fix it.

View solution in original post

5 REPLIES 5

Can you please plot an example of the data?

Mike

http://communities.ptc.com/servlet/JiveServlet/showImage/2-149416-2532/bar_anim.gif

OK, I have joined an example in the form of picture in a ppt file.

I put a picture of waht we can read in a mathcad file and whyt i am getting after importing it in Excel with the Text Import Wizard.

You can see how the Text Import Wizard cannot really identify the data (especially with a minus sign)

Thank you for you help

Go to "Tools", "Worksheet Options", "Built-in Variables" tab, and increase the column width. That might fix it.

I have also tried

WRITEFILE(file_name,"Excel"):=array

but it seems not to work !

Because there's no such function

Patrice Bujard wrote:

Dear Mathcad Guru's,

I am using the function

array = augment(vect1, vect2, vect3,..) n vectors in total. Each vector has m rows

to create an array of data of m rows and n columns

The data can be positive or negative

Then I write the array with the command

WRITEPRN(file_name) = array

When I want to read the data with Excel, I open it with the Text Import Wizard, using the delimited option and space (or other) in order to read the various columns.

It happens very often that the text Import Wizard doesn't recognise correctly the columns.

One way to avoid this issue would be to introduce a delimitation (like space, ; or else) between the columns.

I need to be able to read the data with Excel, after I generated delimited (?) ASCII file with mathcad

I have also tried

WRITEFILE(file_name,"Excel"):=array

but it seems not to work ! What did I wrong there

Does anyone knows how to solve this issue ?

Thank you for your help

Mr. Jackson had the answer, I'm merely providing an example

Announcements

Top Tags