<?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: Creating a Vlookup formula in MVS and creating a excel file using ODS tagse in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Creating-a-Vlookup-formula-in-MVS-and-creating-a-excel-file/m-p/6476#M2530</link>
    <description>Thank you</description>
    <pubDate>Wed, 23 Jan 2008 12:17:12 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-01-23T12:17:12Z</dc:date>
    <item>
      <title>Creating a Vlookup formula in MVS and creating a excel file using ODS tagse</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Creating-a-Vlookup-formula-in-MVS-and-creating-a-excel-file/m-p/6472#M2526</link>
      <description>I am creating an excel file using ods in MVS.   I am trying to create a variable with a vlookup formula in it so when I open it up in excel it will pull from another excel file automatically.    when I print the data set before outputting it using ods It looks like the vlookup formula is in the variable however when I open the file up in excel I get a table error (the file will open) but there is no formula the variable is blank.</description>
      <pubDate>Tue, 22 Jan 2008 14:55:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Creating-a-Vlookup-formula-in-MVS-and-creating-a-excel-file/m-p/6472#M2526</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-01-22T14:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Vlookup formula in MVS and creating a excel file using ODS tagse</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Creating-a-Vlookup-formula-in-MVS-and-creating-a-excel-file/m-p/6473#M2527</link>
      <description>Hi:&lt;BR /&gt;
  When you use ODS, you are creating one of these types of files that can be opened with Excel:&lt;BR /&gt;
1) ODS CSV  (creates a TXT file that has comma separated values)&lt;BR /&gt;
2) ODS HTML-based destinations (ODS HTML3, ODS HTML, ODS MSOFFICE2K) creates an HTML file that can be opened with Excel&lt;BR /&gt;
3) ODS TAGSETS.ExcelXP (creates a Spreadsheet Markup Language XML file that conforms to the Microsoft spec for Office 2002 and higher).&lt;BR /&gt;
&lt;BR /&gt;
   I only know of the ability to supply a formula with ODS TAGSETS.EXCELXP -- so here's what I would check:&lt;BR /&gt;
1) is your syntax for ExcelXP correct for specifying the formula?&lt;BR /&gt;
2) are you using the most current version of the ExcelXP tagset?&lt;BR /&gt;
3) are you using Excel 2002 or higher -- it was my memory, that if you had Excel 2000, that you'd just see the XML in the file. If you're getting a Table error, then you probably have Excel 2002 or higher.&lt;BR /&gt;
&lt;BR /&gt;
To check #1, I don't know the syntax for a VLOOKUP formula. But I have successfully used a formula with TAGSETS.EXCELXP -- see the program below. If you can get this program to work in your environment, then to me, that indicates that the formula you're using is not quite correct. (Of course, you'd have to adjust the FILE= option for the mainframe and you'd have to FTP the results to a platform with Excel 2002 or higher to open the XML)&lt;BR /&gt;
&lt;BR /&gt;
To check #2, look in the SAS log, you should see a note when you use TAGSETS.EXCELXP that says:&lt;BR /&gt;
[pre]&lt;BR /&gt;
NOTE: This is the Excel XP tagset (SAS 9.1.3, v1.70, 06/05/07).&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
As far as I know, setting a formula did work in earlier versions of ExcelXP, but this is the version I used to create my output file and when I opened the file, the values in the PROFIT column were calculated by Excel. I always reverse engineer how a formula looks, by creating a dummy spreadsheet, making an example of the formula I need, then saving the file as XML and opening the file with Notepad to see what the formula looks like. I don't normally think in R/C notation -- which is how I remember the formula has to be specified.&lt;BR /&gt;
&lt;BR /&gt;
If you are sure that your VLOOKUP formula is correct and you are using the most current version of the ExcelXP tagset, then your best bet for help is to contact Tech Support, as they have both Microsoft and ExcelXP expertise. &lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
  &lt;BR /&gt;
[pre]&lt;BR /&gt;
data tkt_alt;&lt;BR /&gt;
  input sample dest $ type $ amt  ;&lt;BR /&gt;
  ** profit needed for ExcelXP formula example;&lt;BR /&gt;
  ** set var to missing in SAS -- want excel to calc formula;&lt;BR /&gt;
  profit = .;&lt;BR /&gt;
  return;&lt;BR /&gt;
datalines;&lt;BR /&gt;
0010 CHICAGO   TEL    100  &lt;BR /&gt;
0222 CHICAGO   TEL    200  &lt;BR /&gt;
0330 GENEVA    WEB    300  &lt;BR /&gt;
0040 GENEVA    WEB    400  &lt;BR /&gt;
0550 LONDON    TEL    500  &lt;BR /&gt;
0066 LONDON    TEL    600  &lt;BR /&gt;
0777 LONDON    WEB    700  &lt;BR /&gt;
0088 PARIS     TEL    800  &lt;BR /&gt;
0990 PARIS     WEB    900  &lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
   &lt;BR /&gt;
ods tagsets.excelxp file='c:\temp\tagattr_formula.xls' &lt;BR /&gt;
    style=sasweb;&lt;BR /&gt;
proc report data=tkt_alt nowd ;&lt;BR /&gt;
  title 'Using tagattr and TAGSETS.EXCELXP';&lt;BR /&gt;
  title2 'Send a Format and Formula for a Column';&lt;BR /&gt;
  column dest sample amt profit;&lt;BR /&gt;
  define dest/display;&lt;BR /&gt;
  define sample /display&lt;BR /&gt;
      style(column)={tagattr="00000"};&lt;BR /&gt;
  define amt/ sum   &lt;BR /&gt;
      style(column)={tagattr="$#,####.00"};&lt;BR /&gt;
  define profit / sum "Profit"&lt;BR /&gt;
            style(column)=&lt;BR /&gt;
           {tagattr='Formula:=SUM(RC[-1]*0.9)'};&lt;BR /&gt;
run; &lt;BR /&gt;
   &lt;BR /&gt;
 ** Profit will be AMT * .9 and AMT is 1 column to the LEFT of PROFIT;&lt;BR /&gt;
 ** in Excel -- so RC[-1] is how I point to AMT;&lt;BR /&gt;
ods tagsets.excelxp close;&lt;BR /&gt;
&lt;BR /&gt;
[/pre]</description>
      <pubDate>Tue, 22 Jan 2008 16:17:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Creating-a-Vlookup-formula-in-MVS-and-creating-a-excel-file/m-p/6473#M2527</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-01-22T16:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Vlookup formula in MVS and creating a excel file using ODS tagse</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Creating-a-Vlookup-formula-in-MVS-and-creating-a-excel-file/m-p/6474#M2528</link>
      <description>Cynthia,  we are using the tagset excelxp version that you have listed.   I am created my formulas as variable before I output using tagset excelxp.   &lt;BR /&gt;
&lt;BR /&gt;
this is what the formula looks like&lt;BR /&gt;
&lt;BR /&gt;
=vlookup($15,'Processed_Pro_Report.csv'!$B$2:$AG$100,31,False)</description>
      <pubDate>Tue, 22 Jan 2008 16:55:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Creating-a-Vlookup-formula-in-MVS-and-creating-a-excel-file/m-p/6474#M2528</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-01-22T16:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Vlookup formula in MVS and creating a excel file using ODS tagse</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Creating-a-Vlookup-formula-in-MVS-and-creating-a-excel-file/m-p/6475#M2529</link>
      <description>Tracy: &lt;BR /&gt;
&lt;BR /&gt;
I've never tried passing a formula as a variable value. I thought the only way you could pass a formula via Tagsets.ExcelXP was as the value for the TAGATTR style element. You'd have to check with Tech Support to be sure.&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 22 Jan 2008 20:44:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Creating-a-Vlookup-formula-in-MVS-and-creating-a-excel-file/m-p/6475#M2529</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-01-22T20:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Vlookup formula in MVS and creating a excel file using ODS tagse</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Creating-a-Vlookup-formula-in-MVS-and-creating-a-excel-file/m-p/6476#M2530</link>
      <description>Thank you</description>
      <pubDate>Wed, 23 Jan 2008 12:17:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Creating-a-Vlookup-formula-in-MVS-and-creating-a-excel-file/m-p/6476#M2530</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-01-23T12:17:12Z</dc:date>
    </item>
  </channel>
</rss>

