<?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 Re: how to open a xpt file? and convert xpt to xls? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/696856#M212930</link>
    <description>ERROR: “SASUSER.DEMO_J.DATA” wirte is not accept</description>
    <pubDate>Thu, 05 Nov 2020 13:03:28 GMT</pubDate>
    <dc:creator>yangzhiyong</dc:creator>
    <dc:date>2020-11-05T13:03:28Z</dc:date>
    <item>
      <title>How to open a xpt file? And how to convert xpt to xls?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/696768#M212884</link>
      <description>&lt;P&gt;&amp;nbsp;I am a new user ,I have a extend filename xpt file example demo_j.xpt file,I want to open it ,and convert to xls file?please help me ,tks&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 20:52:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/696768#M212884</guid>
      <dc:creator>yangzhiyong</dc:creator>
      <dc:date>2021-06-04T20:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to open a xpt file? and convert xpt to xls?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/696785#M212891</link>
      <description>&lt;P&gt;How to read a XPT file, and how to create an excel file, has been discussed many times in this community.&lt;/P&gt;
&lt;P&gt;Please search, try, and if you encounter problems, show your code and ask your question.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 07:14:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/696785#M212891</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-11-05T07:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to open a xpt file? and convert xpt to xls?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/696853#M212928</link>
      <description>LIBNAME XP XPORT "/folders/myfolders/sasuser.v94/DEMO_J.XPT";&lt;BR /&gt;PROC COPY IN=XP OUT=SASUSER;&lt;BR /&gt;RUN;</description>
      <pubDate>Thu, 05 Nov 2020 13:00:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/696853#M212928</guid>
      <dc:creator>yangzhiyong</dc:creator>
      <dc:date>2020-11-05T13:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to open a xpt file? and convert xpt to xls?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/696856#M212930</link>
      <description>ERROR: “SASUSER.DEMO_J.DATA” wirte is not accept</description>
      <pubDate>Thu, 05 Nov 2020 13:03:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/696856#M212930</guid>
      <dc:creator>yangzhiyong</dc:creator>
      <dc:date>2020-11-05T13:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to open a xpt file? and convert xpt to xls?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/696863#M212934</link>
      <description>&lt;P&gt;SASUSER is per default opened read-only nowadays.&lt;/P&gt;
&lt;P&gt;Use WORK or a library defined on the shared folder:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname xp xport "/folders/myfolders/sasuser.v94/DEMO_J.XPT";
libname myfold "/folders/myfolders";

proc copy
  in=xp
  out=myfold
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that it is not necessary to shout at SAS to get it to work.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 13:11:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/696863#M212934</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-05T13:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to open a xpt file? and convert xpt to xls?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/696870#M212937</link>
      <description>&lt;P&gt;The first thing you need to find out is whether the file with the XPT extension is a SAS XPORT file or a SAS CPORT file (or neither).&amp;nbsp; You can check the first 80 bytes to tell, but it is probably just easier to try one method and if it doesn't work then try the other.&lt;/P&gt;
&lt;P&gt;It is much easier to make an XLSX file than and XLS file.&amp;nbsp; Plus they are more portable.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname in xport 'demo_j.xpt';
libname out xlsx 'demo_j.xlsx';
proc copy inlib=in outlib=out;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For a CPORT file you will need to use PROC CIMPORT instead.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc cimport lib=out infile='demog_j.xpt';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Nov 2020 13:46:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/696870#M212937</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-11-05T13:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: how to open a xpt file? and convert xpt to xls?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/696874#M212940</link>
      <description>Thank you very much!</description>
      <pubDate>Thu, 05 Nov 2020 13:49:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/696874#M212940</guid>
      <dc:creator>yangzhiyong</dc:creator>
      <dc:date>2020-11-05T13:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to open a xpt file? and convert xpt to xls?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/696880#M212944</link>
      <description>please help me to write code ,let the file to save a xls file,tks!</description>
      <pubDate>Thu, 05 Nov 2020 14:07:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/696880#M212944</guid>
      <dc:creator>yangzhiyong</dc:creator>
      <dc:date>2020-11-05T14:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to open a xpt file? and convert xpt to xls?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/762175#M241275</link>
      <description>&lt;P&gt;How do I do it if I have NO as in NONE access to SAS, just the .xpt file and excel?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been handed a file and told to make sense of it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doesn't seem to be a way.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 21:41:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/762175#M241275</guid>
      <dc:creator>wel51x</dc:creator>
      <dc:date>2021-08-17T21:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to open a xpt file? and convert xpt to xls?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/763072#M241641</link>
      <description>&lt;P&gt;Answering my own question; Here's quick and dirty python code:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;import pandas as pd&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FILE_PATH = "(directory containing file)"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FILE = "ABC"&amp;nbsp; # filename itself (without suffix)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;# Note: might need to substitute the column name of the index (in quotes) for "None" here&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;df = pd.read_sas(FILE_PATH + FILE + '.XPT', index=None)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;df.to_csv(FILE_PATH + FILE + '.csv')&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Aug 2021 18:24:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-open-a-xpt-file-And-how-to-convert-xpt-to-xls/m-p/763072#M241641</guid>
      <dc:creator>wel51x</dc:creator>
      <dc:date>2021-08-21T18:24:08Z</dc:date>
    </item>
  </channel>
</rss>

