Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

03-09-2000 09:34 PM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

I wonder if anyone could help me. I am reading the contents of a

spreadsheet array and transferring them to Excel using ActiveX. The way I

am doing this is to dump the whole array into excel in one go. I find the

size of the array then convert this size into a range e.g. A1:AH5 etc. To

convert to an excel range I am taking the size of the array, splitting up

the row and col parts, then passing these into the "Row Col to Range Format

VI" that I found in one of the examples, this looks after all the

conversions and produces a string e.g. AH5. I then concatenate this with

the start cell i.e A1: and pass it into the range method of the invoke node.

This all works fine and dumps all the values into excel in the r

ight cells.

The only problem is when I come to graph the numeric data using the chart

wizard. I am graphing two columns X against Y, but excel just draws a set

of values along the X axis and ignores any Y increment. The scale of the

x-axis data is also wrong. Could anyone shed any light on this problem.

What is strange is that I am saving this data to a spreadsheet file as well

and when I open this file and cut and paste the data into excel I can graph

it normally!

Regards,

Martin.

03-10-2000 08:41 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

After reading your post, I was able to duplicate the problem you

describe. I hadn't really noticed it before because I always

poke my data into Excel in numerical (floating point) format.

If you wire a 2D array of floating point values to the "value"

property of the Range object, this problem does not occur. But

if you wire a 2D array of strings, the Y column is indeed not

plotted. Apparently, Excel still considers the data to be

text. You can see this if you change the cell formatting to

numerical and set the number of decimal places. The values in

the cells will not change the number of decimal places showing.

They will also be left-aligned in the cell by default, a sure

indication of text; numerical data is right-aligned. Evidently,

Excel plots X text valu

es (because they are sometimes months,

categories, etc.) and not Y text values.

One of the ways I found you can convert the cells is to select a

column and choose Data>>Text to Column from the Excel menu.

This will convert the text values to numerical format. Another

way to avoid the problem is to pass the Labview Data to the

workbook in numerical format rather than as strings. I am sure

others here probably have different ways of converting the data

using ActiveX. Perhaps they will share. Anyway, hope this

helps.

MaxMar

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *

The fastest and easiest way to search and participate in Usenet - Free!