<?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 Importing and exporting Excel files while retaining formulas? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Importing-and-exporting-Excel-files-while-retaining-formulas/m-p/209378#M51885</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello SAS Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My first time posting so please forgive my ignorance in advance. I have encountered an issue that I don't know how to solve nor can I find any information on it (perhaps because it is not possible). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am merging two Excel files together using Proc SQL in SAS for a customer (along with other data cleaning procedures). They have requested that the formulas they have used in their Excel files remain. Is there a way to keep the formulas when importing an Excel file into SAS, conduct my merge, and export back to Excel with the formulas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: They have several calculated fields and Vlookups within their files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jul 2015 21:11:28 GMT</pubDate>
    <dc:creator>PhdWho</dc:creator>
    <dc:date>2015-07-22T21:11:28Z</dc:date>
    <item>
      <title>Importing and exporting Excel files while retaining formulas?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Importing-and-exporting-Excel-files-while-retaining-formulas/m-p/209378#M51885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello SAS Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My first time posting so please forgive my ignorance in advance. I have encountered an issue that I don't know how to solve nor can I find any information on it (perhaps because it is not possible). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am merging two Excel files together using Proc SQL in SAS for a customer (along with other data cleaning procedures). They have requested that the formulas they have used in their Excel files remain. Is there a way to keep the formulas when importing an Excel file into SAS, conduct my merge, and export back to Excel with the formulas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: They have several calculated fields and Vlookups within their files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 21:11:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Importing-and-exporting-Excel-files-while-retaining-formulas/m-p/209378#M51885</guid>
      <dc:creator>PhdWho</dc:creator>
      <dc:date>2015-07-22T21:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Importing and exporting Excel files while retaining formulas?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Importing-and-exporting-Excel-files-while-retaining-formulas/m-p/209379#M51886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not easily, but you can only export the new data to the excel file instead. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use either some VBA or DDE to export to specific ranges.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 21:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Importing-and-exporting-Excel-files-while-retaining-formulas/m-p/209379#M51886</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-07-22T21:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Importing and exporting Excel files while retaining formulas?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Importing-and-exporting-Excel-files-while-retaining-formulas/m-p/209380#M51887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If i recall, libname excel allows you to update sheets/ranges without changing the other cells.&lt;/P&gt;&lt;P&gt;google these 2 words for lots of help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 02:50:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Importing-and-exporting-Excel-files-while-retaining-formulas/m-p/209380#M51887</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2015-07-24T02:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Importing and exporting Excel files while retaining formulas?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Importing-and-exporting-Excel-files-while-retaining-formulas/m-p/209381#M51888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using LIBNAME Excel you CAN export new &lt;SPAN style="text-decoration: underline;"&gt;values&lt;/SPAN&gt; to a specific range without affecting the cells outside that range.&lt;/P&gt;&lt;P&gt;The rules are fairly strict:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The range of cells must include column names in the first row.&lt;/LI&gt;&lt;LI&gt;Before you overwrite the range, you must drop the table&lt;/LI&gt;&lt;LI&gt;You must overwrite the range with the same number of columns and lines&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, I have a named range called myData in workbook NewTest.xlsx with columns A and B. Outside range myData, I have formulas referring to values from the range. The following works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;libname xl "&amp;amp;sasforum\Datasets\newTest.xlsx";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;create table T as&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select A+1 as A, cats(B,"_") as B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;from xl.myData;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;drop table xl.myData;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;create table xl.myData as&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select * from T;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;libname xl clear;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New values are written to range myData and formulas are adjusted accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 03:39:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Importing-and-exporting-Excel-files-while-retaining-formulas/m-p/209381#M51888</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-07-24T03:39:54Z</dc:date>
    </item>
  </channel>
</rss>

