<?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: Excel with Custom Property Names in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842666#M26019</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;, I'm running on a Windows 2016 server.&amp;nbsp; Normally paths use a back slash on Windows.&amp;nbsp; Maybe it should be a forward slash inside a zip archive?&amp;nbsp; That would be counterintuitive that they would not follow the OS, but I suppose it's worth a try.&amp;nbsp; I it will try later today when I get a chance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
    <pubDate>Sat, 05 Nov 2022 14:25:56 GMT</pubDate>
    <dc:creator>jimbarbour</dc:creator>
    <dc:date>2022-11-05T14:25:56Z</dc:date>
    <item>
      <title>Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842420#M26004</link>
      <description>&lt;P&gt;I want to create an Excel spreadsheet with ODS.&amp;nbsp; I want to create a property with a custom name,&amp;nbsp;MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_Name and assign it a value of either "External Label" or "Internal Label".&amp;nbsp; This is a company specific requirement that we specify the sensitivity of all documents.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know how to create the standard properties like Author, Comments, etc that go into the &lt;STRONG&gt;core.xml&lt;/STRONG&gt; part of an xlsx file, but I don't know how to create a custom property name that would go into the &lt;STRONG&gt;custom.xml&lt;/STRONG&gt; part of an xlsx file.&amp;nbsp; The screen print below is of the docProps folder within an xlsx file that has had the custom property manually set.&amp;nbsp; The XML below that is the contents of custom.xml.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've Googled some, but everything I'm finding relates to just standard properties like Author.&amp;nbsp; Can anyone point me in the right direction here?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jimbarbour_0-1667514268775.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76925iA9E4F1AAB32E414E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jimbarbour_0-1667514268775.png" alt="jimbarbour_0-1667514268775.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="true"?&amp;gt;
-&amp;lt;Properties xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes" xmlns="http://schemas.openxmlformats.org/officeDocument/2006/custom-properties"&amp;gt;
-&amp;lt;property name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_Enabled" pid="2" fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"&amp;gt;
&amp;lt;vt:lpwstr&amp;gt;true&amp;lt;/vt:lpwstr&amp;gt;
&amp;lt;/property&amp;gt;
-&amp;lt;property name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_SetDate" pid="3" fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"&amp;gt;
&amp;lt;vt:lpwstr&amp;gt;2022-11-02T22:36:32Z&amp;lt;/vt:lpwstr&amp;gt;
&amp;lt;/property&amp;gt;
-&amp;lt;property name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_Method" pid="4" fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"&amp;gt;
&amp;lt;vt:lpwstr&amp;gt;Privileged&amp;lt;/vt:lpwstr&amp;gt;
&amp;lt;/property&amp;gt;
-&amp;lt;property name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_Name" pid="5" fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"&amp;gt;
&amp;lt;vt:lpwstr&amp;gt;External Label&amp;lt;/vt:lpwstr&amp;gt;
&amp;lt;/property&amp;gt;
-&amp;lt;property name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_SiteId" pid="6" fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"&amp;gt;
&amp;lt;vt:lpwstr&amp;gt;db05faca-c82a-4b9d-b9c5-0f64b6755421&amp;lt;/vt:lpwstr&amp;gt;
&amp;lt;/property&amp;gt;
-&amp;lt;property name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_ActionId" pid="7" fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"&amp;gt;
&amp;lt;vt:lpwstr&amp;gt;006e8ed9-6489-4393-a145-7272eed3aa2d&amp;lt;/vt:lpwstr&amp;gt;
&amp;lt;/property&amp;gt;
-&amp;lt;property name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_ContentBits" pid="8" fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"&amp;gt;
&amp;lt;vt:lpwstr&amp;gt;0&amp;lt;/vt:lpwstr&amp;gt;
&amp;lt;/property&amp;gt;
&amp;lt;/Properties&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Nov 2022 22:30:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842420#M26004</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2022-11-03T22:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842454#M26005</link>
      <description>&lt;P&gt;I think you will have to first disassemble the .xlsx file (after creation with ODS), then add the text to the custom.xml file, and then reassemble the .xlsx.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 07:41:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842454#M26005</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-11-04T07:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842532#M26007</link>
      <description>&lt;P&gt;Hello, Kurt,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's along the lines of what I was thinking, that I'd have to create the XML with a Data step and add it to the xlsx file inside the docProps folder.&amp;nbsp; It shouldn't be too hard, but I was hoping that there was something that SAS already had in place.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wonder if&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;might have any insight here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 15:52:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842532#M26007</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2022-11-04T15:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842536#M26008</link>
      <description>&lt;P&gt;You don't mention how you are creating the Excel file so I'm not sure this is at all helpful.&lt;/P&gt;
&lt;P&gt;The ODS EXCEL option CATEGORY='text' will place stuff into the Custom Properties of the file. I just can't see how to set the name, it seems to get a generic category tag as the name and the text string is the value.&lt;/P&gt;
&lt;P&gt;Might be helpful as you could have the string value in place in the properties and be able to reduce the amount of editing needed.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 16:23:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842536#M26008</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-11-04T16:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842546#M26009</link>
      <description>&lt;P&gt;It does not look like SAS creates that XML file.&amp;nbsp; At least PROC EXPORT does not.&lt;/P&gt;
&lt;P&gt;So just add it.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let filename=~/class.xlsx;
proc export data=sashelp.class file="&amp;amp;filename" replace dbms=xlsx;
run;
data _null_;
  file "&amp;amp;filename" zip member="docProps/custom.xml";
  infile cards truncover;
  input line $char200.;
  len=length(line);
  put line $varying200. len ;
cards4;
&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="true"?&amp;gt;
-&amp;lt;Properties xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes" xmlns="http://schemas.openxmlformats.org/officeDocument/2006/custom-properties"&amp;gt;
-&amp;lt;property name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_Enabled" pid="2" fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"&amp;gt;
&amp;lt;vt:lpwstr&amp;gt;true&amp;lt;/vt:lpwstr&amp;gt;
&amp;lt;/property&amp;gt;
-&amp;lt;property name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_SetDate" pid="3" fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"&amp;gt;
&amp;lt;vt:lpwstr&amp;gt;2022-11-02T22:36:32Z&amp;lt;/vt:lpwstr&amp;gt;
&amp;lt;/property&amp;gt;
-&amp;lt;property name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_Method" pid="4" fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"&amp;gt;
&amp;lt;vt:lpwstr&amp;gt;Privileged&amp;lt;/vt:lpwstr&amp;gt;
&amp;lt;/property&amp;gt;
-&amp;lt;property name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_Name" pid="5" fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"&amp;gt;
&amp;lt;vt:lpwstr&amp;gt;External Label&amp;lt;/vt:lpwstr&amp;gt;
&amp;lt;/property&amp;gt;
-&amp;lt;property name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_SiteId" pid="6" fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"&amp;gt;
&amp;lt;vt:lpwstr&amp;gt;db05faca-c82a-4b9d-b9c5-0f64b6755421&amp;lt;/vt:lpwstr&amp;gt;
&amp;lt;/property&amp;gt;
-&amp;lt;property name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_ActionId" pid="7" fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"&amp;gt;
&amp;lt;vt:lpwstr&amp;gt;006e8ed9-6489-4393-a145-7272eed3aa2d&amp;lt;/vt:lpwstr&amp;gt;
&amp;lt;/property&amp;gt;
-&amp;lt;property name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_ContentBits" pid="8" fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"&amp;gt;
&amp;lt;vt:lpwstr&amp;gt;0&amp;lt;/vt:lpwstr&amp;gt;
&amp;lt;/property&amp;gt;
&amp;lt;/Properties&amp;gt;
;;;;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Nov 2022 18:09:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842546#M26009</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-11-04T18:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842565#M26010</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry.&amp;nbsp; I should have said more about how I'm creating the Excel spreadsheet.&amp;nbsp; I'm using ODS Excel.&amp;nbsp; Here's a simple example, below.&amp;nbsp; I tried setting Text= in the ODS Excel options, but I didn't see where it set anything after it ran.&amp;nbsp; I may be doing it wrong (syntax or something); I've not used this feature heretofore.&amp;nbsp; It ran successfully but I didn't see any parameter set in the Custom Properties when I examined the resultant xlsx file, and I didn't see a custom.xml file inside the docProps folder inside the xlsx file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA	WORK.Test_Data;
	INFILE	DATALINES4 	DSD	DLM='09'X  missover;
	INPUT	Animal 		$
			Legs		
			Best_Sense	$
			;
DATALINES4;
Dog	4	Smell
Eagle	2	Sight
Bear	4	Smell
Rabbit	4	Hearing 
;;;;
RUN;

ODS	EXCEL	FILE	=	"&amp;amp;File_Name"
	AUTHOR			=	'Jim Barbour via SAS'
	CATEGORY		=	"Iteration &amp;amp;Iteration"
	COMMENTS		=	'This is a test to set the sensitivity to External'
/*	TEXT			=	"MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_Name	=	""External Label"""	*/
	;

PROC	PRINT	DATA=	Test_Data;
RUN;

ODS EXCEL CLOSE;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Nov 2022 20:19:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842565#M26010</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2022-11-04T20:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842596#M26012</link>
      <description>&lt;P&gt;Maybe a configuration issue. How did you check on the properties?&lt;/P&gt;
&lt;P&gt;When I open the file in Libre Office (I don't have Microsoft Office programs installed on this machine) and open the Properties from the File&amp;gt;Properties menu I get the following. The "property name" bit is the result of trying a number of ways that might have "tricked" the app into setting a desired property name but no joy.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="customproperty.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76959iE1AF295234902269/image-size/large?v=v2&amp;amp;px=999" role="button" title="customproperty.png" alt="customproperty.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 21:29:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842596#M26012</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-11-04T21:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842624#M26013</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I check by:&lt;/P&gt;
&lt;P&gt;a) looking at the info panel of Excel and then opening up the drop down for "advanced properties" and&lt;/P&gt;
&lt;P&gt;b) looking at the xml files embedded inside the xlsx file&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Setting "Text=xxxx" does work... sort of.&amp;nbsp; It doesn't affect the custom properties though.&amp;nbsp; Text= just puts a line of inside your Excel worksheet.&amp;nbsp; The below program produces the screen printed output, below.&amp;nbsp; &lt;STRONG&gt;Note the value in cell A1.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jimbarbour_0-1667606862720.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76968iEF9CC6E81B95214F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jimbarbour_0-1667606862720.png" alt="jimbarbour_0-1667606862720.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS	EXCEL	FILE		=	"&amp;amp;File_Name"
	TITLE				=	'Animal Senses and Locomotion'
	AUTHOR				=	'Jim Barbour via SAS'
	CATEGORY			=	"Iteration &amp;amp;Iteration"
	COMMENTS			=	'This is an attempt to set the sensitivity to External Label'
	STATUS				=	'Test'
	KEYWORDS			=	'Custom Properties'
	OPTIONS(
		SHEET_NAME		=	'Animal_Senses_Locomotion'
		GRIDLINES		=	'ON'
		TAB_COLOR		=	'YELLOW'
		)
	TEXT				=	"Hello Ballard, this is text"
	;

PROC	PRINT	DATA=	Test_Data;
RUN;

ODS EXCEL CLOSE;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 05 Nov 2022 00:09:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842624#M26013</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2022-11-05T00:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842627#M26014</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&amp;nbsp; This is excellent.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, I've discovered another complication.&amp;nbsp; The .rels file and the [Content_Types].xml files have to be updated to include the fact that a custom.xml now exists.&amp;nbsp; However, when I try to read in the .rels file which is in the _rels folder, SAS says that it can't find the file.&amp;nbsp; I'm suspicious that the period in the .rels file may be throwing SAS off, but I'm not sure.&amp;nbsp; If I use the same code to try to read a different file in the very same xlsx, it works just fine.&amp;nbsp; Code is below.&amp;nbsp; Log is below that.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have any idea what's going on here?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File is clearly present inside the _rels folder inside the xlsx file:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jimbarbour_0-1667607656097.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76970i5D3CB5307E3A9052/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jimbarbour_0-1667607656097.png" alt="jimbarbour_0-1667607656097.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data	WORK.Rels_XML;
	DROP	_:;
	infile	"&amp;amp;File_Name"	zip	member="_rels&amp;amp;Slash..rels"	LENGTH=SAS_Length;
*	infile	"&amp;amp;File_Name"	zip	member="docProps&amp;amp;Slash.custom.xml"	LENGTH=SAS_Length;
	INPUT	Line	$VARYING32767.	SAS_Length;
	_Position	=	FIND(Line, '&amp;lt;/relationships&amp;gt;', 'i');
	IF	_Position	THEN
		DO;
			SUBSTR(Line,_Position)	=	'&amp;lt;Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties" Target="docProps/custom.xml"/&amp;gt;&amp;lt;/Relationships&amp;gt;';
		END;
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;ERROR: Entry _rels\.rels in zip file 
       C:\Users\jbarbou6\Documents\SAS\Pgm\Training\Excel_Properties_ODS\Excel_External_Label_6.xlsx does not exist.
ERROR: Physical file does not exist, _rels\.rels.&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2022 00:21:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842627#M26014</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2022-11-05T00:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842629#M26015</link>
      <description>&lt;P&gt;What are you trying to read it with?&lt;/P&gt;
&lt;P&gt;Works file for me just using a data step.&lt;/P&gt;
&lt;PRE&gt;132  data _null_;
133    infile "&amp;amp;fname" zip member="_rels/.rels" ;
134    input;
135    put _infile_;
136  run;

NOTE: The infile "xxx/class.xlsx" is:
      (system-specific pathname),
      (system-specific file attributes)

&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&amp;gt;
&amp;lt;Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"&amp;gt;
   &amp;lt;Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/&amp;gt;
   &amp;lt;Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/&amp;gt;
   &amp;lt;Relationship Id="rId3" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/&amp;gt;
&amp;lt;/Relationships&amp;gt;
NOTE: 6 records were read from the infile (system-specific pathname).
      The minimum record length was 16.
      The maximum record length was 149.
NOTE: DATA statement used (Total process time):
      real time           0.09 seconds
      cpu time            0.00 seconds&lt;/PRE&gt;</description>
      <pubDate>Sat, 05 Nov 2022 02:12:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842629#M26015</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-11-05T02:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842630#M26016</link>
      <description>&lt;P&gt;Why did you use \ instead of / in the member name?&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2022 02:16:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842630#M26016</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-11-05T02:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842666#M26019</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;, I'm running on a Windows 2016 server.&amp;nbsp; Normally paths use a back slash on Windows.&amp;nbsp; Maybe it should be a forward slash inside a zip archive?&amp;nbsp; That would be counterintuitive that they would not follow the OS, but I suppose it's worth a try.&amp;nbsp; I it will try later today when I get a chance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2022 14:25:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842666#M26019</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2022-11-05T14:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842667#M26020</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;, I'm reading the xlsx file with the Data step I posted earlier.&amp;nbsp; I'll post it below for ease of reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data	WORK.Rels_XML;
	DROP	_:;
	infile	"&amp;amp;File_Name"	zip	member="_rels&amp;amp;Slash..rels"	LENGTH=SAS_Length;
*	infile	"&amp;amp;File_Name"	zip	member="docProps&amp;amp;Slash.custom.xml"	LENGTH=SAS_Length;
	INPUT	Line	$VARYING32767.	SAS_Length;
	_Position	=	FIND(Line, '&amp;lt;/relationships&amp;gt;', 'i');
	IF	_Position	THEN
		DO;
			SUBSTR(Line,_Position)	=	'&amp;lt;Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties" Target="docProps/custom.xml"/&amp;gt;&amp;lt;/Relationships&amp;gt;';
		END;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 05 Nov 2022 14:29:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842667#M26020</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2022-11-05T14:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842674#M26022</link>
      <description>&lt;P&gt;You can ask SAS to lookup the names.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file='c:\downloads\class.xlsx' ;
proc print data=sashelp.class;
run;
ods excel;
filename xlsx zip 'c:\downloads\class.xlsx' ;

data xlsx_members ;
  did = dopen('xlsx');
  do num=1 to dnum(did);
    length name $200;
    name = dread(did,num);
    output;
  end;
  did=dclose(did);
  drop did;
run;

proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;Obs    num    name

  1      1    [Content_Types].xml
  2      2    xl/worksheets/sheet1.xml
  3      3    xl/worksheets/_rels/sheet1.xml.rels
  4      4    xl/worksheets/sheet2.xml
  5      5    xl/worksheets/_rels/sheet2.xml.rels
  6      6    xl/workbook.xml
  7      7    xl/styles.xml
  8      8    xl/sharedStrings.xml
  9      9    xl/theme/theme1.xml
 10     10    docProps/app.xml
 11     11    xl/_rels/workbook.xml.rels
 12     12    docProps/core.xml
 13     13    _rels/.rels
&lt;/PRE&gt;</description>
      <pubDate>Sat, 05 Nov 2022 16:00:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842674#M26022</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-11-05T16:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842709#M26024</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Changing to a forward slash inside the Zip archive worked.&amp;nbsp; I can now read the _rels/.rels file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm now having what appears to be a problem with the Zip engine on a SAS Filename.&amp;nbsp; I have to update a number of the xml files in order to keep everything in sync:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;_rels/.rels&lt;/LI&gt;
&lt;LI&gt;docProps/app.xml&lt;/LI&gt;
&lt;LI&gt;docProps/custom.xml&lt;/LI&gt;
&lt;LI&gt;[Content_Types].xml&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Everything runs fine, but when I try to open things in Excel, I get a message that there's a problem.&amp;nbsp; Recovery fails.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jimbarbour_0-1667703758678.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76988i06E0DCB528B3C5A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="jimbarbour_0-1667703758678.png" alt="jimbarbour_0-1667703758678.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When I actually look at the contents of the xlsx file using WinZip, I typically get&amp;nbsp; a message that there's a CRC checksum mismatch.&amp;nbsp; Exactly which of the xml components gets this message varies with the order I create the xml components.&amp;nbsp; It shouldn't matter what order I create the xml components.&amp;nbsp; It seems to me that the Zip engine shouldn't be doing this.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jimbarbour_1-1667703843753.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76989i1AC47A96302FF6F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="jimbarbour_1-1667703843753.png" alt="jimbarbour_1-1667703843753.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm running SAS 9.4 M6 on a Windows Server 2016 Standard (64 bit) machine.&amp;nbsp; My program is below.&amp;nbsp; The order of xml component creation is controlled by the&amp;nbsp; order in the DATALINES4.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you happen to have any insight here?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Detailed messages.&amp;nbsp; I note that components that I'm not even touching are getting their CRC check sums messed up.&amp;nbsp; I think that indicates a problem with the Zip engine.&lt;/P&gt;
&lt;PRE&gt;Extracting file: C:\Users\jbarbou6\Documents\SAS\Pgm\Training\Excel_Properties_ODS\Class_3.ZIP
Extracting to "C:\Users\jbarbou6\Documents\SAS\Pgm\Training\Excel_Properties_ODS\Class_3\"
Use Path: yes   Overlay Files: no
Extracting xl\worksheets\sheet1.xml
Extracting xl\sharedStrings.xml
Extracting docProps\core.xml
Extracting xl\styles.xml
Central and local directory mismatch for file "xl/styles.xml" (crc-32 - local: 1148BA33 hex  central: 3E9D0B61 hex).
Extracting docProps\app.xml
Extracting _rels\.rels
Central and local directory mismatch for file "_rels/.rels" (crc-32 - local: 1148BA33 hex  central: 52D5847E hex).
Extracting xl\_rels\workbook.xml.rels
Unable to find the local header for xl\_rels\workbook.xml.rels.
Extracting xl\workbook.xml
Central and local directory mismatch for file "xl/workbook.xml" (crc-32 - local: 721EAEAE hex  central: 4B8E0F38 hex).
Severe Error: Local and central CRC values don't match.&lt;/PRE&gt;
&lt;P&gt;Program:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%Time_Stamp(START);

**	Set slash to back slash for Windows or forward slash for LINUX/UNIX	**;
%LET	Slash		=	%SYSFUNC(IFC(%EVAL(&amp;amp;SYSSCP = WIN),\,/));

*%LET	Iteration	=	0;

%IF	%SYMEXIST(Iteration)	%THEN
	%DO;
		%LET	Iteration	=	%EVAL(&amp;amp;Iteration + 1);
	%END;
%ELSE
	%DO;
		%LET	Iteration	=	1;
	%END;

%PUT	&amp;amp;Nte1  Running Iteration &amp;amp;Iteration;

%LET	Path		=	C:\Users\jbarbou6\Documents\SAS\Pgm\Training\Excel_Properties_ODS;
*%LET	Path		=	I:\commercial\user\jbarbou3\ODS_Excel;
%LET	File_Name	=	&amp;amp;Path.&amp;amp;Slash.Class_&amp;amp;Iteration..xlsx;

**	Create an xlsx file with Proc Export	**;
PROC	EXPORT	DATA=sashelp.class	FILE="&amp;amp;File_Name"	REPLACE	DBMS=xlsx;
RUN;

FILENAME	XL_File	ZIP	"&amp;amp;File_Name";

**------------------------- Relationships --------------------------------**;
**	Read in the .rels relationships file, add a reference to custom.xml, and write out a SAS data set containing the modified .rels xml	**;
DATA	WORK.Rels_XML;
	DROP	_:;
	INFILE	XL_File(_rels/.rels)	LENGTH=SAS_Length;
	INPUT	Line	$VARYING32767.	SAS_Length;
	_Position	=	FIND(Line, '&amp;lt;/relationships&amp;gt;', 'i');
	IF	_Position	THEN
		DO;
			PUTLOG	"&amp;amp;Nte1  Adding custom.xml entry to spreadsheet iteration &amp;amp;Iteration";
			SUBSTR(Line,_Position)	=	'&amp;lt;Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties" Target="docProps/custom.xml"/&amp;gt;&amp;lt;/Relationships&amp;gt;';
		END;
RUN;

**------------------------- Content Types --------------------------------**;
**	Read in the Content Types XML file, add a reference to custom.xml, and write out a SAS data set containing the modified Content Types XML.	**;
DATA	WORK.Content_Types_XML;
	DROP	_:;
	INFILE	XL_File([Content_Types].xml)	LENGTH=SAS_Length;
	INPUT	Line	$VARYING32767.	SAS_Length;
	_Position	=	FIND(Line, '&amp;lt;/Types&amp;gt;', 'i');
	IF	_Position	THEN
		DO;
			PUTLOG	"&amp;amp;Nte1  Adding custom.xml entry to spreadsheet iteration &amp;amp;Iteration";
			SUBSTR(Line,_Position)	=	'&amp;lt;Override PartName="/docProps/custom.xml" ContentType="application/vnd.openxmlformats-officedocument.custom-properties+xml"/&amp;gt;&amp;lt;/Types&amp;gt;';
		END;
RUN;

**--------------------------- Custom.XML --------------------------------**;
**	Create a SAS data set that contains the custom XML that will set the label to either External or Internal	**;
DATA	WORK.Custom_XML;
	INFILE	DATALINES4	LENGTH=SAS_Length;
	INPUT	Line	$VARYING32767.	SAS_Length;
DATALINES4;
&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&amp;gt;
&amp;lt;Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/custom-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"&amp;gt;&amp;lt;property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="2" name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_Enabled"&amp;gt;&amp;lt;vt:lpwstr&amp;gt;true&amp;lt;/vt:lpwstr&amp;gt;&amp;lt;/property&amp;gt;&amp;lt;property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="3" name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_SetDate"&amp;gt;&amp;lt;vt:lpwstr&amp;gt;2022-11-05T21:48:26Z&amp;lt;/vt:lpwstr&amp;gt;&amp;lt;/property&amp;gt;&amp;lt;property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="4" name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_Method"&amp;gt;&amp;lt;vt:lpwstr&amp;gt;Privileged&amp;lt;/vt:lpwstr&amp;gt;&amp;lt;/property&amp;gt;&amp;lt;property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="5" name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_Name"&amp;gt;&amp;lt;vt:lpwstr&amp;gt;External Label&amp;lt;/vt:lpwstr&amp;gt;&amp;lt;/property&amp;gt;&amp;lt;property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="6" name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_SiteId"&amp;gt;&amp;lt;vt:lpwstr&amp;gt;db05faca-c82a-4b9d-b9c5-0f64b6755421&amp;lt;/vt:lpwstr&amp;gt;&amp;lt;/property&amp;gt;&amp;lt;property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="7" name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_ActionId"&amp;gt;&amp;lt;vt:lpwstr&amp;gt;6d6ffa67-7505-4457-b8c1-4592fb83e3c9&amp;lt;/vt:lpwstr&amp;gt;&amp;lt;/property&amp;gt;&amp;lt;property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="8" name="MSIP_Label_320f21ee-9bdc-4991-8abe-58f53448e302_ContentBits"&amp;gt;&amp;lt;vt:lpwstr&amp;gt;0&amp;lt;/vt:lpwstr&amp;gt;&amp;lt;/property&amp;gt;&amp;lt;/Properties&amp;gt;
;;;;
RUN;

**--------------------------- App.XML --------------------------------**;
**	Create a SAS data set that contains the App.XML that will correspond to the rest of the XML	**;
DATA	WORK.App_XML;
	INFILE	DATALINES4	LENGTH=SAS_Length;
	INPUT	Line	$VARYING32767.	SAS_Length;
DATALINES4;
&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&amp;gt;
&amp;lt;Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"&amp;gt;&amp;lt;Application&amp;gt;Microsoft Excel&amp;lt;/Application&amp;gt;&amp;lt;DocSecurity&amp;gt;0&amp;lt;/DocSecurity&amp;gt;&amp;lt;ScaleCrop&amp;gt;false&amp;lt;/ScaleCrop&amp;gt;&amp;lt;HeadingPairs&amp;gt;&amp;lt;vt:vector size="4" baseType="variant"&amp;gt;&amp;lt;vt:variant&amp;gt;&amp;lt;vt:lpstr&amp;gt;Worksheets&amp;lt;/vt:lpstr&amp;gt;&amp;lt;/vt:variant&amp;gt;&amp;lt;vt:variant&amp;gt;&amp;lt;vt:i4&amp;gt;1&amp;lt;/vt:i4&amp;gt;&amp;lt;/vt:variant&amp;gt;&amp;lt;vt:variant&amp;gt;&amp;lt;vt:lpstr&amp;gt;Named Ranges&amp;lt;/vt:lpstr&amp;gt;&amp;lt;/vt:variant&amp;gt;&amp;lt;vt:variant&amp;gt;&amp;lt;vt:i4&amp;gt;1&amp;lt;/vt:i4&amp;gt;&amp;lt;/vt:variant&amp;gt;&amp;lt;/vt:vector&amp;gt;&amp;lt;/HeadingPairs&amp;gt;&amp;lt;TitlesOfParts&amp;gt;&amp;lt;vt:vector size="2" baseType="lpstr"&amp;gt;&amp;lt;vt:lpstr&amp;gt;Class_25&amp;lt;/vt:lpstr&amp;gt;&amp;lt;vt:lpstr&amp;gt;Class_25&amp;lt;/vt:lpstr&amp;gt;&amp;lt;/vt:vector&amp;gt;&amp;lt;/TitlesOfParts&amp;gt;&amp;lt;Company&amp;gt;SAS Institute Inc&amp;lt;/Company&amp;gt;&amp;lt;LinksUpToDate&amp;gt;false&amp;lt;/LinksUpToDate&amp;gt;&amp;lt;SharedDoc&amp;gt;false&amp;lt;/SharedDoc&amp;gt;&amp;lt;HyperlinksChanged&amp;gt;false&amp;lt;/HyperlinksChanged&amp;gt;&amp;lt;AppVersion&amp;gt;16.0300&amp;lt;/AppVersion&amp;gt;&amp;lt;/Properties&amp;gt;
;;;;
RUN;

**	Update/add the XML files to the xlsx file which is a Zip archive	**;
DATA	_NULL_;
	LENGTH	Mem_Name	$128;

	INFILE	DATALINES4;
	INPUT	Mem_Name	$;
	FILE	XL_File	MEMVAR=Mem_Name;
	PUTLOG	"&amp;amp;Nte1  1.  "	_N_=  Mem_Name=;

	IF	Mem_Name	=	'docProps/custom.xml'	THEN
		DO;
			**	Create the custom.xml file from the SAS data set that contains the custom XML that will set the label to either External or Internal	**;
			PUTLOG	"&amp;amp;Nte1  Processing "		Mem_Name;
			DO	UNTIL	(End_Custom);	
				SET	WORK.CUSTOM_XML				END=End_Custom;
				Leng	=	length(line);
				PUT	Line	$Varying32767.		Leng;
			END;
		END;

	IF	Mem_Name	=	'docProps/app.xml'	THEN
		DO;
			**	Create the app.xml file from the SAS data set that contains the App XML	**;
			PUTLOG	"&amp;amp;Nte1  Processing "		Mem_Name;
			DO	UNTIL	(End_App);	
				SET	WORK.App_XML				END=End_App;
				Leng	=	length(line);
				PUT	Line	$Varying32767.		Leng;
			END;
		END;

	IF	Mem_Name	=	'_rels/.rels'			THEN
		DO;
			**	Write the modified .rels xml to the .rels file	**;
			PUTLOG	"&amp;amp;Nte1  Processing "		Mem_Name;
			DO	UNTIL	(End_Rels);
				SET	WORK.Rels_XML				END=End_Rels;
				Leng	=	length(line);
				PUT	Line	$Varying32767.		Leng;
			END;
		END;

	IF	Mem_Name	=	'[Content_Types].xml'	THEN
		DO;
			**	Write the modified Content Types XML to the Content Types XML file	**;
			PUTLOG	"&amp;amp;Nte1  Processing "		Mem_Name;
			DO	UNTIL	(End_Content);
				SET	WORK.Content_Types_XML		END=End_Content;
				Leng	=	length(line);
				PUT	Line	$Varying32767.		Leng;
			END;
		END;

DATALINES4;
_rels/.rels
docProps/custom.xml
docProps/app.xml
[Content_Types].xml
;;;;
RUN;

%Time_Stamp(STOP);
&lt;/CODE&gt;&lt;/PRE&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>Sun, 06 Nov 2022 03:15:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842709#M26024</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2022-11-06T03:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842766#M26027</link>
      <description>&lt;P&gt;Break the process into steps to figure out which one is causing the issue.&lt;/P&gt;
&lt;P&gt;Expand the XLSX file into actual files (using UNZIP).&lt;/P&gt;
&lt;P&gt;Rebuild it into&amp;nbsp; a new file (using ZIP).&lt;/P&gt;
&lt;P&gt;Does it still work?&amp;nbsp; If not then perhaps the changes are not compatible with what Excel wants.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then introduce making the changes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try making the changes without SAS.&lt;/P&gt;
&lt;P&gt;Try making the changes with SAS, but only one file at a time (perhaps it is the MEMNAME= file option that is confused).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then try making the changes in the original XLSX file.&amp;nbsp; Perhaps it is the ZIP engine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Nov 2022 17:45:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842766#M26027</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-11-06T17:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842822#M26028</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Break the process into steps to figure out which one is causing the issue.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That was the first thing I tried.&amp;nbsp; No luck.&amp;nbsp; No combination of run order of the steps separated out individually works.&amp;nbsp; Each combination of steps all produce one kind of error or another, typically the CRC check failure but sometimes "file is not a zip file" also occurs.&amp;nbsp; In fact, the reason I combined all the update steps and used a Memvar was to see if somehow the CRC error might be resolved if all updates/adds were in one Data step.&amp;nbsp; No luck; neither individual Data steps nor a combined all-in-one Data step worked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Expand the XLSX file into actual files (using UNZIP).&lt;/P&gt;
&lt;P&gt;Rebuild it into&amp;nbsp; a new file (using ZIP).&lt;/P&gt;
&lt;P&gt;Does it still work?&amp;nbsp; If not then perhaps the changes are not compatible with what Excel wants.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I can't expand the xlsx file if updates have been applied.&amp;nbsp; Well, I can open it, but many of the component XML files inside get a CRC error and cannot be opened.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I created a xlsx file using the SASHELP.Class data set and Proc Export.&amp;nbsp; I unzipped everything and manually applied updates to the XML using ordinary Windows Notepad.&amp;nbsp; After the manual updates, I zipped everything up.&amp;nbsp; Everything worked fine.&amp;nbsp; The resultant xlsx file opens in Excel, displays the Class data correctly,&amp;nbsp;&lt;EM&gt;and&amp;nbsp;&lt;/EM&gt;has the "External" label applied correctly.&amp;nbsp; This would seem to confirm that the SAS zip engine is having some kind of problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've also, using SAS, made one change at a time.&amp;nbsp; If I do only one of the four changes, it works fine at least in the sense that I can see the expected XML in the zip archive.&amp;nbsp; However, if I try to do multiple updates, no matter what order I do them in, I get CRC errors.&amp;nbsp; Individually, they work fine.&amp;nbsp; Taken together, Excel cannot open the file, and I can't unzip the XML components inside the xlsx due to CRC errors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Everything seems to be pointing to a SAS zip engine error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Edit:&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;I have a sneaking suspicion that SAS may be just updating the files inside the Zip archive without re-calculating the checksums, possibly causing the apparent out-of-sync type messages I'm getting that state that the central and local directory have CRC-32 check sums that are different.&amp;nbsp; I haven't found it yet, but if there were a way to force the SAS Zip engine to recalculate all the CRC-32 check sums, that might correct the problem.&amp;nbsp; I'm sure that WinZip calculates all the CRC-32 check sums afresh when I zip everything up.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jimbarbour_0-1667801982655.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77014i2315C9E4008E782F/image-size/large?v=v2&amp;amp;px=999" role="button" title="jimbarbour_0-1667801982655.png" alt="jimbarbour_0-1667801982655.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 06:24:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842822#M26028</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2022-11-07T06:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842907#M26029</link>
      <description>&lt;P&gt;I suppose, since it at least appears to be a SAS Zip engine issue, that I ought to open a new thread.&amp;nbsp; I can't really address the ODS issue -- which I think is essentially solved -- until the Zip issue is resolved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 16:34:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842907#M26029</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2022-11-07T16:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842910#M26030</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/37107"&gt;@jimbarbour&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I suppose, since it at least appears to be a SAS Zip engine issue, that I ought to open a new thread.&amp;nbsp; I can't really address the ODS issue -- which I think is essentially solved -- until the Zip issue is resolved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you have an reproducible issue with the ZIP engine then open a ticket with SAS support and see if they can figure out waht is happening.&amp;nbsp; They might know of a work around, or at least it gets on their list of known issues and so might get fixed in the future.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 17:03:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842910#M26030</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-11-07T17:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with Custom Property Names</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842914#M26031</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:
&lt;P class="1667841560931"&gt;&amp;nbsp;&lt;/P&gt;
&lt;SPAN&gt;If you have an reproducible issue with the ZIP engine then open a ticket with SAS support and see if they can figure out waht is happening.&amp;nbsp; They might know of a work around, or at least it gets on their list of known issues and so might get fixed in the future.&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I just created a thread specific to the Zip engine issue.&amp;nbsp; I'm hoping that someone may have already encountered this and already have a work-around.&amp;nbsp; If not, then opening a support ticket is definitely the next step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 17:22:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excel-with-Custom-Property-Names/m-p/842914#M26031</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2022-11-07T17:22:26Z</dc:date>
    </item>
  </channel>
</rss>

