<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic import excel files in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/import-excel-files/m-p/809907#M40610</link>
    <description>&lt;P&gt;i have a dataset in excel file ,&amp;nbsp; then how to write format length datatype&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daily1_0-1650991745492.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70858iB3AADEF99F70AFB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daily1_0-1650991745492.png" alt="Daily1_0-1650991745492.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;this type of variable&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daily1_1-1650991785209.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70859i436CA4FF53998A7F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daily1_1-1650991785209.png" alt="Daily1_1-1650991785209.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;i want change this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daily1_2-1650991852827.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70861i49542FF2F3C1ACA8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daily1_2-1650991852827.png" alt="Daily1_2-1650991852827.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Apr 2022 16:51:04 GMT</pubDate>
    <dc:creator>Daily1</dc:creator>
    <dc:date>2022-04-26T16:51:04Z</dc:date>
    <item>
      <title>import excel files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/import-excel-files/m-p/809907#M40610</link>
      <description>&lt;P&gt;i have a dataset in excel file ,&amp;nbsp; then how to write format length datatype&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daily1_0-1650991745492.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70858iB3AADEF99F70AFB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daily1_0-1650991745492.png" alt="Daily1_0-1650991745492.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;this type of variable&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daily1_1-1650991785209.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70859i436CA4FF53998A7F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daily1_1-1650991785209.png" alt="Daily1_1-1650991785209.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;i want change this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daily1_2-1650991852827.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70861i49542FF2F3C1ACA8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daily1_2-1650991852827.png" alt="Daily1_2-1650991852827.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 16:51:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/import-excel-files/m-p/809907#M40610</guid>
      <dc:creator>Daily1</dc:creator>
      <dc:date>2022-04-26T16:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: import excel files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/import-excel-files/m-p/809911#M40611</link>
      <description>&lt;P&gt;Please write more words, that explain the problem in detail, emphasis on "in detail", we don't want brevity.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 17:05:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/import-excel-files/m-p/809911#M40611</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-26T17:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: import excel files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/import-excel-files/m-p/809913#M40612</link>
      <description>i want to change format, data type (char/num) and length ..........just i want easy code to change this things&lt;BR /&gt;/* --------------------------------------------------------------------&lt;BR /&gt;Code generated by a SAS task&lt;BR /&gt;&lt;BR /&gt;Generated on Tuesday, April 26, 2022 at 10:11:27 PM&lt;BR /&gt;By task: Import Data Wizard&lt;BR /&gt;&lt;BR /&gt;Source file: C:\Users\HP\Downloads\Sample - Superstore.xls&lt;BR /&gt;Server: Local File System&lt;BR /&gt;&lt;BR /&gt;Output data: WORK.Sample _ Superstore&lt;BR /&gt;Server: SASApp&lt;BR /&gt;&lt;BR /&gt;Note: In preparation for running the following code, the Import&lt;BR /&gt;Data wizard has used internal routines to transfer the source data&lt;BR /&gt;file from the local file system to SASApp. There is no SAS code&lt;BR /&gt;available to represent this action.&lt;BR /&gt;-------------------------------------------------------------------- */&lt;BR /&gt;&lt;BR /&gt;/* --------------------------------------------------------------------&lt;BR /&gt;This DATA step reads the data values from a temporary text file&lt;BR /&gt;created by the Import Data wizard. The values within the temporary&lt;BR /&gt;text file were extracted from the Excel source file.&lt;BR /&gt;-------------------------------------------------------------------- */&lt;BR /&gt;&lt;BR /&gt;DATA WORK.'Sample _ Superstore'n;&lt;BR /&gt;LENGTH&lt;BR /&gt;'Row ID'n 8&lt;BR /&gt;'Order ID'n $ 14&lt;BR /&gt;'Order Date'n 8&lt;BR /&gt;'Ship Date'n 8&lt;BR /&gt;'Ship Mode'n $ 14&lt;BR /&gt;'Customer ID'n $ 8&lt;BR /&gt;'Customer Name'n $ 22&lt;BR /&gt;Segment $ 11&lt;BR /&gt;Country $ 13&lt;BR /&gt;City $ 17&lt;BR /&gt;State $ 20&lt;BR /&gt;'Postal Code'n $ 5&lt;BR /&gt;Region $ 7&lt;BR /&gt;'Product ID'n $ 15&lt;BR /&gt;Category $ 15&lt;BR /&gt;'Sub-Category'n $ 11&lt;BR /&gt;'Product Name'n $ 127&lt;BR /&gt;Sales 8&lt;BR /&gt;Quantity 8&lt;BR /&gt;Discount 8&lt;BR /&gt;Profit 8 ;&lt;BR /&gt;FORMAT&lt;BR /&gt;'Row ID'n BEST12.&lt;BR /&gt;'Order ID'n $CHAR14.&lt;BR /&gt;'Order Date'n DATE9.&lt;BR /&gt;'Ship Date'n DATE9.&lt;BR /&gt;'Ship Mode'n $CHAR14.&lt;BR /&gt;'Customer ID'n $CHAR8.&lt;BR /&gt;'Customer Name'n $CHAR22.&lt;BR /&gt;Segment $CHAR11.&lt;BR /&gt;Country $CHAR13.&lt;BR /&gt;City $CHAR17.&lt;BR /&gt;State $CHAR20.&lt;BR /&gt;'Postal Code'n $CHAR5.&lt;BR /&gt;Region $CHAR7.&lt;BR /&gt;'Product ID'n $CHAR15.&lt;BR /&gt;Category $CHAR15.&lt;BR /&gt;'Sub-Category'n $CHAR11.&lt;BR /&gt;'Product Name'n $CHAR127.&lt;BR /&gt;Sales BEST12.&lt;BR /&gt;Quantity BEST12.&lt;BR /&gt;Discount BEST12.&lt;BR /&gt;Profit BEST12. ;&lt;BR /&gt;INFORMAT&lt;BR /&gt;'Row ID'n BEST12.&lt;BR /&gt;'Order ID'n $CHAR14.&lt;BR /&gt;'Order Date'n DATE9.&lt;BR /&gt;'Ship Date'n DATE9.&lt;BR /&gt;'Ship Mode'n $CHAR14.&lt;BR /&gt;'Customer ID'n $CHAR8.&lt;BR /&gt;'Customer Name'n $CHAR22.&lt;BR /&gt;Segment $CHAR11.&lt;BR /&gt;Country $CHAR13.&lt;BR /&gt;City $CHAR17.&lt;BR /&gt;State $CHAR20.&lt;BR /&gt;'Postal Code'n $CHAR5.&lt;BR /&gt;Region $CHAR7.&lt;BR /&gt;'Product ID'n $CHAR15.&lt;BR /&gt;Category $CHAR15.&lt;BR /&gt;'Sub-Category'n $CHAR11.&lt;BR /&gt;'Product Name'n $CHAR127.&lt;BR /&gt;Sales BEST12.&lt;BR /&gt;Quantity BEST12.&lt;BR /&gt;Discount BEST12.&lt;BR /&gt;Profit BEST12. ;&lt;BR /&gt;INFILE '/saswork/SAS_workA36A00006151_odaws01-apse1.oda.sas.com/#LN00015'&lt;BR /&gt;LRECL=307&lt;BR /&gt;ENCODING="UTF-8"&lt;BR /&gt;TERMSTR=CRLF&lt;BR /&gt;DLM='7F'x&lt;BR /&gt;MISSOVER&lt;BR /&gt;DSD ;&lt;BR /&gt;INPUT&lt;BR /&gt;'Row ID'n : BEST32.&lt;BR /&gt;'Order ID'n : $CHAR14.&lt;BR /&gt;'Order Date'n : BEST32.&lt;BR /&gt;'Ship Date'n : BEST32.&lt;BR /&gt;'Ship Mode'n : $CHAR14.&lt;BR /&gt;'Customer ID'n : $CHAR8.&lt;BR /&gt;'Customer Name'n : $CHAR22.&lt;BR /&gt;Segment : $CHAR11.&lt;BR /&gt;Country : $CHAR13.&lt;BR /&gt;City : $CHAR17.&lt;BR /&gt;State : $CHAR20.&lt;BR /&gt;'Postal Code'n : $CHAR5.&lt;BR /&gt;Region : $CHAR7.&lt;BR /&gt;'Product ID'n : $CHAR15.&lt;BR /&gt;Category : $CHAR15.&lt;BR /&gt;'Sub-Category'n : $CHAR11.&lt;BR /&gt;'Product Name'n : $CHAR127.&lt;BR /&gt;Sales : BEST32.&lt;BR /&gt;Quantity : BEST32.&lt;BR /&gt;Discount : BEST32.&lt;BR /&gt;Profit : BEST32. ;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Apr 2022 17:14:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/import-excel-files/m-p/809913#M40612</guid>
      <dc:creator>Daily1</dc:creator>
      <dc:date>2022-04-26T17:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: import excel files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/import-excel-files/m-p/809914#M40613</link>
      <description>&lt;P&gt;You can just change the code used to read in the Excel file. SAS has provided you with this code.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 17:20:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/import-excel-files/m-p/809914#M40613</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-26T17:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: import excel files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/import-excel-files/m-p/809915#M40614</link>
      <description>&lt;P&gt;So from the latest post is looks like.&lt;/P&gt;
&lt;P&gt;1) You are using Enterprise Guide.&lt;/P&gt;
&lt;P&gt;2) You are using the Import wizard of Enterprise Guide to read a file that is accessible of the machine where you are running Enterprise Guide (which could be a completely different machine that where the SAS code that Enterprise Guide generates runs).&lt;/P&gt;
&lt;P&gt;3) You can an old style XLS file instead of a more modern XLSX file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What the Enterprise Guide wizard has done is read in that XLS file on your Windows machine and converted it to a text file. It then uploaded that file and generated and run the data step you showed the log messages about.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately I do not know if that Wizard has any way for you to tell it how to write the code to read the text file it generated. Or if has anything you can control to change how it generates the text file from the XLS file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With normal SAS code there is very little you can do to control how PROC IMPORT will define the variables created from an XLS or XLSX file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So most likely you will need to either:&lt;/P&gt;
&lt;P&gt;1) Add an additional step after the "import" to make a new version of the file with the data types you want (note in SAS the word FORMAT means the way that a variable is DISPLAYED, not how it is STORED).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) Add a step your PC to convert the sheet from the XLS file into a text file.&amp;nbsp; Then upload that file to your SAS server and write your own data step to read it.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 17:28:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/import-excel-files/m-p/809915#M40614</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-04-26T17:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: import excel files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/import-excel-files/m-p/809916#M40615</link>
      <description>First Format all the variable&lt;BR /&gt;&lt;BR /&gt;Name Type Length Format Informat Label&lt;BR /&gt;no Numeric 8 BEST12. BEST12.&lt;BR /&gt;YEAR Numeric 8 BEST12. BEST12.&lt;BR /&gt;PSL Character 5 $CHAR5. $CHAR5.&lt;BR /&gt;SCHEME Numeric 8 BEST12. BEST12.&lt;BR /&gt;INDUSTRY Character 4 $CHAR4. $CHAR4.&lt;BR /&gt;CD Character 5 $CHAR5. $CHAR5.&lt;BR /&gt;STATE Numeric 8 BEST12. BEST12.&lt;BR /&gt;District Numeric 8 BEST12. BEST12.&lt;BR /&gt;SECTOR Numeric 8 BEST12. BEST12.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;just i want change this type format&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Name Type Length Format Informat Label&lt;BR /&gt;no Numeric 8 6 BEST12. SCH_DES_NO&lt;BR /&gt;YEAR Character 28 $28. $28. YEAR&lt;BR /&gt;PSL Character 5 $5. $CHAR5.&lt;BR /&gt;SCHEME Numeric 8 BEST12. BEST12. SCH_CODE&lt;BR /&gt;INDUSTRY Character 40 $4. $40. NIC_04_4DIGIT&lt;BR /&gt;CD Character 40 $5. $40. NIC_04_5DIGIT&lt;BR /&gt;STATE Numeric 8 BEST12. BEST12. STATE_CODE&lt;BR /&gt;District Numeric 8 2&lt;BR /&gt;SECTOR Numeric 8 BEST12. BEST12. SECTOR</description>
      <pubDate>Tue, 26 Apr 2022 17:32:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/import-excel-files/m-p/809916#M40615</guid>
      <dc:creator>Daily1</dc:creator>
      <dc:date>2022-04-26T17:32:50Z</dc:date>
    </item>
  </channel>
</rss>

