<?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: xlsx engine: can variable label be exported in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/xlsx-engine-can-variable-label-be-exported/m-p/882481#M348639</link>
    <description>&lt;P&gt;I don't know any option which work with the xlsx engine using the libname statement.&lt;/P&gt;
&lt;P&gt;My question is on whether someone knows an option I would not aware of.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jun 2023 16:55:08 GMT</pubDate>
    <dc:creator>xxformat_com</dc:creator>
    <dc:date>2023-06-26T16:55:08Z</dc:date>
    <item>
      <title>xlsx engine: can variable label be exported</title>
      <link>https://communities.sas.com/t5/SAS-Programming/xlsx-engine-can-variable-label-be-exported/m-p/882262#M348583</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I was wondering on whether there is any option which can be used with the xlsx engine to keep variable labels in export files as does the label option of proc export.&lt;/P&gt;
&lt;P&gt;I know that dblabel can be used with the excel engine but what about the xlsx engine?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data class;
    set sashelp.class;
    label name='First Name';
run;

libname test xlsx "&amp;amp;xxtest/test_libname.xlsx";

data test.class;
    set class;
run;

libname test;

proc export data    = class
            dbms    = xlsx
            outfile = "&amp;amp;xxtest./test_procexport.xlsx"
            replace
            label;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Jun 2023 11:28:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/xlsx-engine-can-variable-label-be-exported/m-p/882262#M348583</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2023-06-24T11:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: xlsx engine: can variable label be exported</title>
      <link>https://communities.sas.com/t5/SAS-Programming/xlsx-engine-can-variable-label-be-exported/m-p/882268#M348589</link>
      <description>&lt;P&gt;It looks like you have the code to try it. Why don't you try it and see what happens?&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jun 2023 13:48:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/xlsx-engine-can-variable-label-be-exported/m-p/882268#M348589</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-06-24T13:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: xlsx engine: can variable label be exported</title>
      <link>https://communities.sas.com/t5/SAS-Programming/xlsx-engine-can-variable-label-be-exported/m-p/882481#M348639</link>
      <description>&lt;P&gt;I don't know any option which work with the xlsx engine using the libname statement.&lt;/P&gt;
&lt;P&gt;My question is on whether someone knows an option I would not aware of.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 16:55:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/xlsx-engine-can-variable-label-be-exported/m-p/882481#M348639</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2023-06-26T16:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: xlsx engine: can variable label be exported</title>
      <link>https://communities.sas.com/t5/SAS-Programming/xlsx-engine-can-variable-label-be-exported/m-p/882486#M348644</link>
      <description>&lt;P&gt;Not sure what you're trying to do overall, but ODS EXCEL can split a file into two using BY as sheet_interval and then proc print with a label.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.class out=class;
by sex;
run;

ods excel file='/home/fkhurshed/test.xlsx' options(sheet_interval = 'bygroup') style=minimal;
options nobyline;
proc print data=class noobs;
by sex;
run;

proc print data=class label noobs;
label age = 'Age (years)' weight = 'Weight (lbs)' height = 'Height (in)';
run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 17:31:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/xlsx-engine-can-variable-label-be-exported/m-p/882486#M348644</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-06-26T17:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: xlsx engine: can variable label be exported</title>
      <link>https://communities.sas.com/t5/SAS-Programming/xlsx-engine-can-variable-label-be-exported/m-p/882487#M348645</link>
      <description>&lt;P&gt;What happens when you execute the code you show. Do the labels appear, or not?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 17:21:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/xlsx-engine-can-variable-label-be-exported/m-p/882487#M348645</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-06-26T17:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: xlsx engine: can variable label be exported</title>
      <link>https://communities.sas.com/t5/SAS-Programming/xlsx-engine-can-variable-label-be-exported/m-p/882491#M348647</link>
      <description>&lt;P&gt;Why not just try it?&lt;/P&gt;
&lt;PRE&gt;602
603  libname x xlsx "C:\downloads\test_labels.xlsx" ;
NOTE: Libref X was successfully assigned as follows:
      Engine:        XLSX
      Physical Name: C:\downloads\test_labels.xlsx
604  data x.datastep(dblabel=yes); set class ; run;
                     -------
                     22

ERROR 22-7: Invalid option name DBLABEL.

NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


605  libname x clear;
NOTE: Libref X has been deassigned.
&lt;/PRE&gt;
&lt;P&gt;Looks like the answer is NO.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So use PROC EXPORT.&lt;/P&gt;
&lt;P&gt;Or ODS EXCEL;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file= "C:\downloads\test_labels.xlsx" ;
proc print data=class label;
run;
ods excel close;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Jun 2023 17:50:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/xlsx-engine-can-variable-label-be-exported/m-p/882491#M348647</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-26T17:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: xlsx engine: can variable label be exported</title>
      <link>https://communities.sas.com/t5/SAS-Programming/xlsx-engine-can-variable-label-be-exported/m-p/882545#M348665</link>
      <description>I was wondering on whether other options than the one I mentioned in my question could exist but I would not be aware of. db... options are for excel not for xlsx.</description>
      <pubDate>Mon, 26 Jun 2023 21:03:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/xlsx-engine-can-variable-label-be-exported/m-p/882545#M348665</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2023-06-26T21:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: xlsx engine: can variable label be exported</title>
      <link>https://communities.sas.com/t5/SAS-Programming/xlsx-engine-can-variable-label-be-exported/m-p/882546#M348666</link>
      <description>only proc export uses the label, not the other methods. But I'm not sure why you're asking it as I've already specify it in my question.</description>
      <pubDate>Mon, 26 Jun 2023 21:05:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/xlsx-engine-can-variable-label-be-exported/m-p/882546#M348666</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2023-06-26T21:05:23Z</dc:date>
    </item>
  </channel>
</rss>

