Why not try VBA to pass the data from Excel? Look at the sample file
XFERTODF.XLS in the SP2000\SAMPLES\OLEAUTO\VBA folder.
Basically, the approach is to use VBA to define the array to pass, then directly
pass it to a new data frame which VBA creates. Works really well.
HTH
Don
Michael Camilleri <branzmtc@branz.org.nz> on 09/27/99 05:01:59 PM
To: "'s-news@wubios.wustl.edu'" <s-news@wubios.wustl.edu>
cc: (bcc: Don Mango/AmericanRe)
Subject: [S] Excel Import Problem
I have been having some problems with importing Excel spreadsheets into
S-plus, and hope someone might have some insight (or at least avoid the same
problems).
When importing a ragged array from an Excel spreadsheet (i.e. there is a
header, and many empty cells in the first 100 rows) S-Plus does not import
all the columns. It will stop importing columns after it encounters a column
of empty cells, or a block of empty cells in the first 100 rows (approx).
S-PLus appears to only look at the first 100 or so rows to determine the
number of columns to import.
If I specify the number of columns (EndCol parameter) to match the actual
data, then it crashes.
The only way around it seems to be to put in the Excel missing value codes
#N/A, which is a pain to do, and complicates my procedure which converts the
ragged array to a list.
Be warned: this problem can cause data loss by failing to import data. Be
safe and put #N/A codes in empty cells in XL.
Any ideas?
Michael Camilleri
Energy and Environment Section
BRANZ
Private Bag 50908
Porirua City
New Zealand
Ph: +64 6 235 7600
Fax: +64 4 235 6070
email: branzmtc@branz.org.nz
http://www.branz.org.nz
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|