If you have SAS 9.4 Maintenance 2 or later, try it out! Let me know how it works for you by sharing a comment here. I have found LIBNAME XLSX to be a quick, convenient method to bring in Excel data on any SAS platform. For these reasons, I recommend using DATA step to copy the Excel content that you want to another SAS library, then CLEAR the XLSX library to free the lock on the Excel file. Some techniques to MODIFY the data in-place will not work. The engine starts at the beginning of the file and continues in sequence to the end of the file. One other IMPORTANT caution: The XLSX engine is a sequential access engine in that it processes data one record after the other. If you need that sort of flexibility, you can use PROC IMPORT to provide more control over exactly what Excel content is brought into SAS and how. Also, you won't see the familiar "$" decoration around the spreadsheet names when they are surfaced in the library within SAS. For example, the XLSX engine does not support Excel named ranges (which can surface a portion of a spreadsheet as a discrete table). The XLSX libname is different from the EXCEL and PCFILES engines in other ways. Remember, you can also create Microsoft Excel files with Base SAS by using ODS EXCEL (as of 9.4 Maintenance 3). Here is my output in Microsoft Excel with all of these data sets now as sheets: Libname xlout XLSX '/folders/myfolders/samples.xlsx'
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
February 2023
Categories |