The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 COM GetWorksheet and missing values with Excel
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

peter.cook

UK
356 Posts

Posted - 05/10/2004 :  08:02:11 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
HI,

When I use GetWorksheet with Excel it interprets all missing values symbols as -1.23456789E-300.

Why does it do this and how can I avoid it?

Cheers,

pete

easwar

USA
1965 Posts

Posted - 05/10/2004 :  10:49:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Pete,

This occurs if the Origin column is set as Numeric and not Text&Numeric. When set as T&N, the cells in Excel turn up blank. When set as N, the cells do turn up with the value of -1.23456789E-300. This is because NANUM (missing value) in Origin is represented by exactly this number.

We will need to handle this so that still blank values are sent to Excel when the Origin cell is set to missing value in a numeric column. This is now tracked as QA#6386. Thanks for bringing this to our attention.

Easwar
OriginLab


Go to Top of Page

peter.cook

UK
356 Posts

Posted - 05/10/2004 :  12:05:25 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Easwar,

Thanks for the reply.

I think I can live with this for an Excel application either by changing to text and numeric where possible or replacing '--' within Excel immediately after GetWorksheet.

What would be appropriate then for a VB application after dumping the data into an array?

Cheers,

pete

Go to Top of Page

easwar

USA
1965 Posts

Posted - 05/10/2004 :  1:45:57 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Pete,

This issue is already fixed in our internal build and so the fix may be available in the next (SR3) service release. Data from numeric columns in Origin will behave the same way as from text and numeric columns - the entries in the variant that correspond to missing values in Origin will be cleared.

From a client stand point, what that means is, for example with Excel, the cells that get the data from Origin and correspond to missing values in Origin, will be blank (like it does now when getting data from T&N columns in Origin with missing values). The blank values however are still treated as zero by Excel I think. I guess Excel does not have missing value handling, and so you may need to code something special to "handle" such cells?

Easwar


Go to Top of Page

peter.cook

UK
356 Posts

Posted - 05/11/2004 :  04:02:23 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Easwar,

Excellent. I really hope this gets into SR3. We're starting to use COM functionality more now and there is the likelihood that most Origin usage here will involve this.

Cheers,

Pete

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000