Problem with LoadXL

Learning APL or new to Dyalog? Ask "silly" questions here, without fear...
Post Reply
REMINGTON30
Posts: 22
Joined: Fri Aug 11, 2017 2:17 pm

Problem with LoadXL

Post by REMINGTON30 »

I have used LoadXL to transfer vectors or matrices of numerical data to Dyalog APL. However, the line of code below produces DOMAIN ERROR. In the actual code, it is displayed on one line. The indicated range on the spreadsheet is all numerical data. The Excel spreadsheet is located but, for some reason, will not transfer to APL. What is wrong?

Scores←LoadXL'F:\My_Documents_Recent_2017Fall\EMEC425_Fall2017\EMEC425_Final_Fall2017APL.xlsx' 'Sheet1' 'F6:I99'

DOMAIN ERROR
LoadXL[43] :Else ⋄ Sheet←Workbook.Sheets[⊂sheet] ⋄ :EndIf

Status
DISP_E_EXCEPTION (DISP_E_BADINDEX)

Vince|Dyalog
Posts: 439
Joined: Wed Oct 01, 2008 9:39 am

Re: Problem with LoadXL

Post by Vince|Dyalog »

Hi Remington30,

I think that that error means that Sheet1 is not a valid sheetname.

I can get that error if I give an invalid sheetname.

Please take a look at this sequence:
      Workbook.Sheets[⊂'Sheet1']
DOMAIN ERROR
Workbook.Sheets[⊂'Sheet1']

Workbook.Sheets.Count
2
Workbook.Sheets[1].Name
MainSheet
Workbook.Sheets[2].Name
Printable
Workbook.Sheets[⊂'MainSheet']
#.[OLEClient].[Workbooks].[_Workbook].[Sheets].[_Worksheet]


Regards,

Vince
REMINGTON30
Posts: 22
Joined: Fri Aug 11, 2017 2:17 pm

Re: Problem with LoadXL

Post by REMINGTON30 »

Vince:

You are correct. The Excel sheet with the data was labeled 'Worksheet'. I changed it to 'Sheet1' and now LoadXL works for the problem.

Thanks for the help.
Post Reply