BookmarkSubscribeRSS Feed
JayS
Obsidian | Level 7
Have EG connected to a Mapped SharePoint drive. Am using the DBMS=EXCELCS to import a *.xlsx file off of SharePoint. Having problems defining the startrow=2 value as the first row has text garbage that I need to skip. Seems like the EXCELCS has different parameters than other DBMS identifiers... How can I point the import to start at row_2 (headers) row_3 down has all data.... SAS EG: 7.15 TIA.. J ******************************************** Error Message: startrow=2; ________ 180 ERROR 180-322: Statement is not valid or it is used out of proper order.
4 REPLIES 4
Reeza
Super User
Instead of startrow try specifying the RANGE.

Range = "Sheet1$A2:0";

The 0 indicates that it should read to the end of the data.

JayS
Obsidian | Level 7

ISSUE: Need to skip over the First Row of the Excel document on a Mapped SharePoint site using PC File Server.

Still struggling with this one...

Read through numerous white papers and tried multiple combinations of Options...

It seems the issue is with the following statement, as it points to PC SAS Server running my laptop: DBMS=EXCELCS

Are there any articles that specifically refer to the EXCELCS and values I can assign.

It seems the documentation uses the DBMS=EXCEL or the extension variations of Excel (xls…) which is different from my approach.

When I use the Range= option I get the: ERROR: File _IMEX_.'MasterInput$A2:0'n.DATA does not exist. regardless of how I identify the range.

The Range I need is $A2:0

Note: The excel document is fairly large: CL 1698 is the last cell I need to read in...

Thinking maybe I'll just have to modify the Excel and save it off in the format SAS EG likes...

Thanks...

SASKiwi
PROC Star

I suggest you work with SAS Tech Support on this. The RANGE option is supported with EXCELCS so there must be something else going on.

 

Have you tried specifying the range without the sheet name?

 

Also please post  your complete SAS log using </> so we can see clearly what is happening.

JayS
Obsidian | Level 7

Thanks, Yes tried numerous combinations of and values...

I just confirmed the *.xls is 'flat' no lookups or links which is what I though may have been causing the issue (white papers)

I'll check with SAS Tech Support and see what they come up with.

Thanks, Jay

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1001 views
  • 1 like
  • 3 in conversation