ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

create XML from RPG read as EXCEL

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • create XML from RPG read as EXCEL

    This program produces the below spreadsheet.
    It writes XML to IFS which is then read automagically
    by excel.

    I attached program as well as the XMLit created...


    Code:
         H dftactgrp( *no ) bnddir( 'QC2LE') OPTION(*NODEBUGIO)
          * --------------------------------------------------
          * Program - EXCEL
          * Purpose - 
          * Written - 
          * Author  - 
          *
          * PROGRAM DESCRIPTION
          *   create example XML to view as excel
          *
          * INPUT PARAMETERS
          *   Description        Type  Size    How Used
          *   -----------        ----  ----    --------
          *
          *
          * INDICATOR USAGE
          *   xx - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
          *---------------------------------------------------
          *
          *
         d Buf             s          65000A
         d BufP            s               *   INZ(%ADDR(Buf))
         d BufLen          s             10U 0
         d CmdString       s          10000
         d CmdLength       s             15  5
         d company         s              2s 0
         d Complete        s              1
         d count           s              5  0
         d count2          s              5  0
         d cp              s             10U 0 INZ(819)
         d CR              c                   CONST(X'0d')
         d CRLF            c                   CONST(X'0d25')
         d Current         s              1
         d cymd            s              7  0
         d Data            s          65000
         d dbxfil          s             10
         d dbxlib          s             10
         d dbxown          s             10
         d dbxtxt          s             50
         d dbxatr          s              2
         d deleted         s               n
         d DQ              c                   CONST('"')
         d FileNam         s             15A   inz('/xml/jamie2.xml')
         d FileName1       s             21
         d FileName2       s             21
         d FileNamP        s               *   inz(%ADDR(FileNam))
         d FileDescr       s             10I 0
         d FirstNew        s              1
         d formated        s              7
         d formatBack      s          65535A   varying
         d From            c                   CONST(',"''')
         d header          s          65000
         d ISODate         s               D
         d LC#             s              3  0
         d LaborCodes      s              3    dim(100)
         d LaborCodeCu     s              1    dim(100)
         d LaborCodeCo     s              1    dim(100)
         d LaborCodePd     s              7  0 dim(100)
         d Len             s              3  0
         d Length          s              9
         d Lilian          s             10i 0
         d NewDate         s             52a
         d NLZero          s              2A   INZ(X'1500')
         d O_CREAT         s             10I 0 INZ(8)
         d O_RDWR          s             10I 0 INZ(4)
         d O_TEXTDATA      s             10I 0 INZ(16777216)
         d O_CODEPAGE      s             10I 0 INZ(8388608)
         d Oflag           s             10I 0 INZ(0)
         d Omode           s             10U 0 INZ(511)
         d Pos             s              4  0
         d Produced        s              7  0
         d Q               c                   CONST('''')
         d ReadOneRecord   s              1
         d reporttype      s             20
         d RC              s             10I 0
         d savecustomer    s              5  0
         d savelib         s             10
         d SI_Fmt          s             50A   INZ('\n')
         d SI_FmtP         s               *   INZ(%ADDR(SI_Fmt))
         d SI_Msg          s             50A
         d SI_MsgP         s               *   INZ(%ADDR(SI_Msg))
         d sqlrecords      s              9  0
         d sqlstmt         s          23000    varying
         d Str             s              3  0
         d style           s          65000
         d To              c                   CONST('   ')
         d useweight       s              7  0
         d Width           s              7
         d WKSDES          s             30
         d Workread        s              3  0
         d x               s              2  0
         d ZeroBin         s              1A   INZ(*ALLX'00')
          *
          * Program Info
          *
         d                SDS
         d  @PGM                 001    010
         d  @PARMS               037    039  0
         d  @JOB                 244    253
         d  @USER                254    263
         d  @JOB#                264    269  0
          *
         d openList        pr
         d FetchNext       pr              n
         d closeList       pr
          *
         d Num_DS          DS
         d Num_Hex                        4A   INZ(X'00000000')
         d Num                           10I 0 OVERLAY(Num_Hex)
    
         dperror           PR            10I 0 EXTPROC('perror')
         dconst                            *   VALUE
    
         dsprintf          PR            10I 0 EXTPROC('sprintf')
         d                                 *   VALUE
         d                                 *   VALUE
         d                               10I 0 VALUE OPTIONS(*NOPASS)
         d                                 *   VALUE OPTIONS(*NOPASS)
          * Open Operations
          * value returned = file descriptor 0 (OK), -1 (Error)
    
         dopen             PR            10I 0 EXTPROC('open')
         d                                 *   VALUE
         d                               10I 0 VALUE
         d                               10U 0 VALUE OPTIONS(*NOPASS)
         d                               10U 0 VALUE OPTIONS(*NOPASS)
    
          * Read Operations
          * value returned = number of bytes read or , -1 (Error)
    
         Dread             PR            10I 0 EXTPROC('read')
         d                               10I 0 VALUE
         d                                 *   Value
         d                               10U 0 VALUE
    
          * Write Operations
          * value returned = number of bytes Written or , -1 (Error)
    
         dwrite            PR            10I 0 EXTPROC('write')
         d                               10I 0 VALUE
         d                                 *   VALUE
         d                               10U 0 VALUE
    
          * Close Operations
          * value returned = 0 (OK) or , -1 (Error)
    
         dclose            PR            10I 0 EXTPROC('close')
         d                               10I 0 VALUE
    
          * Open Directory Operation
          * value returned = file descriptor 0 (OK), -1 (Error)
    
         dopendir          PR              *   EXTPROC('opendir')
         d                                 *   VALUE
    
          * Read Directory Operation
          *
    
    
         dreaddir          PR              *   EXTPROC('readdir')
         d                                 *   VALUE
    
          * Open Directory Operation
          * value returned = 0 (OK) or , -1 (Error)
    
         dclosedir         PR            10I 0 EXTPROC('closedir')
         d                                 *   VALUE
    
          * Unlink a File from system... Delete File
          * value returned = 0 (OK) or , -1 (Error)
    
         dunlink           PR            10I 0 EXTPROC('unlink')
         d path                            *   Value options(*string)
    
         d CEEDAYS         pr                  opdesc
         d   InputDate                65535A   const options(*varsize)
         d   picture                  65535A   const options(*varsize)
         d   Lilian                      10i 0
         d   Feedback                    12a   options(*omit)
    
         d CEEDATE         pr                  opdesc
         d   Lilian                      10i 0
         d   picture                  65535A   const options(*varsize)
         d   OutputDate               65535A   const options(*varsize)
         d   Feedback                    12a   options(*omit)
    
    
          /Free
    
    
              exsr $buildifs;
              exsr $readfile;
    
              clear data;
              data = '</Workbook>' + CRLF;
              Buf = %trim(Data);
              BufLen = %scan(CRLF:Buf);
              RC = write(filedescr: BufP: BufLen);
    
              RC = close(FileDescr);
              if FileDescr = -1;
               RC = perror(FileNamP);
               Return;
              endif;
    
              *inlr = *on;
    
            //--------------------------------------------------------
            // $buildIFS - build the temp table in IFS
            //--------------------------------------------------------
                 begsr $buildIFS;
    
                  Filenam = %trim('/xml/jamie.xml');
                  Filenamp = %ADDR(FileNam);
    
                  Oflag = O_CREAT + O_RDWR + O_CODEPAGE;
                  FileDescr=open(FileNamP:Oflag:Omode:cp);
                  if FileDescr = -1;
                   RC = perror(FileNamP);
                   return;
                  endif;
    
                  RC = close(FileDescr);
                  if        RC = -1;
                   RC = perror(FileNamP);
                   return;
                  endif;
    
                  Oflag =  O_RDWR + O_TEXTDATA;
                  FileDescr=open(FileNamP:Oflag);
                  if        FileDescr = -1;
                   RC = perror(FileNamP);
                   Return;
                  endif;
    
    
                  // Write the header
                  Buf = %trim(Data) + CRLF;
                  BufLen = %scan(CRLF:Buf);
                  RC = write(filedescr: BufP: BufLen);
                  clear DATA;
    
                 endsr;
    
            //--------------------------------------------------------
            // $readfile - pretend to read file of libs
            //--------------------------------------------------------
                 begsr $readfile;
    
                  for count2 = 1 to 5;   // replace with your libraries
                   select;
                    when count2 = 1;
                     saveLib = 'JAMIELIB';
                    when count2 = 2;
                     saveLib = 'QGPL';
                    when count2 = 3;
                     saveLib = 'QSYS';
                    when count2 = 4;
                     saveLib = 'QRPG';
                    when count2 = 5;
                     saveLib = 'QUSRSYS';
                   endsl;
                   exsr $header;
                   exsr $detail;
                   exsr $footer;
                  endfor;
    
                 endsr;
    
            //--------------------------------------------------------
            // $header - write the header for the excel sheet.
            //--------------------------------------------------------
                 begsr $header;
    
                  data =
                 '<Worksheet ss:Name=' + DQ + %trim(saveLib) + DQ + '>' + cr    +
                 '<Table '                                                       +
                 ' x:FullColumns="1"'                                            +
                 ' x:FullRows="1">' + cr                                         +
                 '<Column ss:AutoFitWidth="0" ss:Width="39.75"/>' +cr            +
                 '<Column ss:AutoFitWidth="0" ss:Width="90" ss:Span="1"/>' +cr   +
                 '<Column ss:Index="9" ss:AutoFitWidth="0" ss:Width="69.75"/>'+crlf;
    
                  Buf = %trim(Data);
                  BufLen = %scan(CRLF:Buf);
                  RC = write(filedescr: BufP: BufLen);
                  clear data;
    
                  // add new heading
                  data =
                    '<Row ss:Height="14.25"> ' +cr                               +
                    ' <Cell ss:MergeAcross="8" ss:StyleID="s22"> '+cr            +
                    ' <Data ss:Type="String">'  +cr                              +
                    ' Files Listed from QADBXFIL'                                +
                     cr + ' </Data></Cell>'+cr                                   +
                    '</Row>' + cr ;
    
                // write the five column headings
                  data = %trim(data) +   cr +
                ' <Row>'                                                          +
                '  <Cell ss:StyleID="s23"><Data ss:Type="String">'                +
                'File'                                                            +
                '  </Data></Cell>'                                                +
                                cr                                                +
                '  <Cell ss:StyleID="s23"><Data ss:Type="String">'                +
                'Library'                                                         +
                '  </Data></Cell>'                                                +
                                cr                                                +
                '  <Cell ss:StyleID="s23"><Data ss:Type="String">'                +
                'Owner'                                                           +
                '  </Data></Cell>'                                                +
                                cr                                                +
                '  <Cell ss:StyleID="s23"><Data ss:Type="String">'                +
                'Description'                                                     +
                '  </Data></Cell>'                                                +
                                cr                                                +
                '  <Cell ss:StyleID="s23"><Data ss:Type="String">'                +
                'Attribute'                                                       +
                '  </Data></Cell>'                                                +
                             cr                                                   +
                ' </Row> '   + crlf ;
    
                  Buf = %trim(Data);
                  BufLen = %scan(CRLF:Buf);
                  RC = write(filedescr: BufP: BufLen);
                  clear data;
    
                 endsr;
            //--------------------------------------------------------
            // $detail - get detail for current salesperson for today
            //--------------------------------------------------------
                 begsr $detail;
    
    
                  sqlstmt = 'select '          +
                            'dbxfil,dbxlib,dbxown,dbxtxt,dbxatr ' +
                            ' from QADBXFIL '  +
                            ' where DBXLIB = ' + Q+ %trim(saveLib) + Q ;
                  openList();
                  dow fetchNext();
                   exsr $writerow;
                  enddo;
                  closeList();
    
                 endsr;
            //--------------------------------------------------------
            // $writerow - write detail row of spread sheet
            //--------------------------------------------------------
                 begsr $writerow;
    
                  dbxtxt = %xlate('/':' ': dbxtxt);
                  dbxtxt = %xlate('*':' ': dbxtxt);
    
                     for count = 1 to 05;
                      select;
                       when count = 1;
                        data = cr + '<Row>' +  CR +
                               '<Cell><Data ss:Type="String">' +
                               %trim(dbxfil) + '</Data></Cell>' + cr ;
                       when count = 2;
                        data = %trim(data) + CR +
                               '<Cell  ss:StyleID="s24"><Data ss:Type="String">' +
                               %trim(dbxlib)  +
                               '</Data></Cell>' + cr;
                       when count = 3;
                        data = %trim(data) + CR +
                               '<Cell  ss:StyleID="s24"><Data ss:Type="String">' +
                               %trim(dbxown)  +
                               '</Data></Cell>' + cr;
                       when count = 4;
                        data = %trim(data) + CR +
                               '<Cell  ss:StyleID="s24"><Data ss:Type="String">' +
                               %trim(dbxtxt)  +
                               '</Data></Cell>' + cr;
                       when count = 5;
                        data = %trim(data) + CR +
                               '<Cell  ss:StyleID="s24"><Data ss:Type="String">' +
                               %trim(dbxatr)  +
                               '</Data></Cell>' + cr;
    
                      endsl;
    
                     endfor;
    
                     data = %trim(data) + cr + '</Row>' + CRLF;
                     Buf = %trim(Data);
                     BufLen = %scan(CRLF:Buf);
                     RC = write(filedescr: BufP: BufLen);
                     clear DATA;
    
    
                 endsr;
            //--------------------------------------------------------
            // $footer - close all the tags
            //--------------------------------------------------------
                 begsr $footer;
    
               // write footer
                    data =
                ' </Table>'  + cr                                                 +
                ' <WorksheetOptions xmlns="urn:schemas-microsoft-com:'            +
                'office:excel">' + cr                                             +
                ' <TabColorIndex>47</TabColorIndex>' + cr                         +
                ' <ProtectObjects>False</ProtectObjects>' +cr                     +
                ' <ProtectScenarios>False</ProtectScenarios>' + cr                +
                ' </WorksheetOptions>' + cr                                       +
                ' </Worksheet>' + crlf ;
                    Buf = %trim(Data);
                    BufLen = %scan(CRLF:Buf);
                    RC = write(filedescr: BufP: BufLen);
                    clear DATA;
    
                 endsr;
    
            //--------------------------------------------------------
            // *inzsr - initial one time run subroutine
            //--------------------------------------------------------
                 begsr *inzsr;
    
                // get todays date in cymd format
    
                   isodate  = %date();
    
                  // build the headers for the xml
    
             header =
              '<?xml version="1.0"?>'  + CR                                        +
              '<?mso-application progid="Excel.Sheet"?>' + CR                      +
              '<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"'     +
              CR                                                                   +
              'xmlns:o="urn:schemas-microsoft-com:office:office"'                  +
              CR                                                                   +
              'xmlns:x="urn:schemas-microsoft-com:office:excel"'                   +
              CR                                                                   +
              'xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"'            +
              CR                                                                   +
              'xmlns:html="http://www.w3.org/TR/REC-html40">'                      +
              CR                                                                   +
              '<DocumentProperties xmlns="urn:schemas-microsoft-com'               +
              ':office:office">'  + CR                                             +
              '<Author>Author</Author>' + CR                                       +
              '<LastAuthor>flanary</LastAuthor>'  + CR                             +
              '<Created>2008-05-10T01:38:01Z</Created>' + CR                       +
              '<Version>11.9999</Version>' + CR                                    +
              '</DocumentProperties>' + CR                                         +
              '<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">' +CR +
              '<WindowHeight>7755</WindowHeight>' + CR                             +
              '<WindowWidth>15225</WindowWidth>'  + CR                             +
              '<WindowTopX>0</WindowTopX>' + CR                                    +
              '<WindowTopY>255</WindowTopY>'   + CR                                +
              '<ActiveSheet>1</ActiveSheet>'   + CR                                +
              '<ProtectStructure>False</ProtectStructure>'  +CR                    +
              '<ProtectWindows>False</ProtectWindows>'     +CR                     +
              '</ExcelWorkbook> ' + CR ;
    
             style  =
             '<Styles>' + CR                                              +
             '<Style ss:ID="Default" ss:Name="Normal">' + CR              +
             '<Alignment ss:Vertical="Bottom"/>'+ CR                      +
             '<Borders/>' + CR                                            +
             '<Font/>' + CR                                               +
             '<Interior/>' + CR                                           +
             '<NumberFormat/>'+ CR                                        +
             '<Protection/>'+ CR                                          +
             '</Style>'  + CR                                             +
             '<Style ss:ID="s22">' + CR                                   +
             '<Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>' +CR +
             '<Font x:Family="Swiss" ss:Size="11" ss:Color="#000080"/>'+CR+
             '</Style>' + CR                                              +
             '<Style ss:ID="s23">'  + CR                                  +
             '<Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>'+CR+
             '<Font x:Family="Swiss" ss:Color="#0000FF" ss:Bold="1"/>' +CR+
             '</Style>'  + CR                                             +
             '<Style ss:ID="s24">'  + CR                                  +
             '<NumberFormat ss:Format="Standard"/>'  + CR                 +
             '</Style>' + CR                                              +
             '<Style ss:ID="s25">'  + CR                                  +
             '<Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>'+CR+
             '<NumberFormat ss:Format="Standard"/>'  + CR                 +
             '<Font x:Family="Swiss" ss:Color="#0000FF" ss:Bold="1"/>' +CR+
             '</Style>'  + CR                                             +
             '<Style ss:ID="s26">'+ CR                                    +
             '<Borders>' + CR                                             +
             '<Border ss:Position="Bottom" ss:LineStyle="Double" ss:Weight="3"/>' +
             CR                                                                   +
             '<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>'+
             CR                                                                   +
             '</Borders>' + CR                                                    +
             '<NumberFormat ss:Format="Standard"/>' + CR                          +
             '</Style>' + CR                                                      +
             '<Style ss:ID="s27">' + CR                                           +
             '<Borders>'+ CR                                                      +
             '<Border ss:Position="Bottom" ss:LineStyle="Double" ss:Weight="3"/>' +
             CR                                                                   +
             '<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>'+
             CR                                                                   +
             '</Borders>'   + CR                                                  +
             '<NumberFormat ss:Format="Percent"/>'+ CR                            +
             '</Style>' + CR                                                      +
             '</Styles>' + CR;
    
                 data = %trim(header) + CR + %trim(style) ;
                 CEEDAYS(%char(isodate): 'YYYY-MM-DD': lilian: *omit);
                 formatBack = 'Wwwwwwwwwz, DD Mmmmmmmmmz YYYY';
                 CEEDATE(Lilian: Formatback : NewDate: *omit);
                  // this ===> Wednesday, 27 June 2007
    
    
                 endsr;
    
          /End-Free
          *--------------------------------------------------------
          *  openList  - Open a cursor to read file
          *--------------------------------------------------------
         p openList        b
    
         d openList        pi
    
          /Free
    
           exec sql
            declare MyCursor cursor for statement;
    
           exec sql
            prepare statement from :sqlstmt;
    
           exec sql
            open mycursor;
    
          /End-Free
    
         p openList        e
          *--------------------------------------------------------
          *  fetchNext  - read one record at a time
          *--------------------------------------------------------
         p fetchNext       b
    
         d fetchNext       pi              n
    
          /free
    
           exec sql
            fetch next from mycursor into : dbxfil ,
                                          : dbxlib ,
                                          : dbxown ,
                                          : dbxtxt ,
                                          : dbxatr  ;
             if sqlstt < '02000';
               return *on;
             else;
               return *off;
             endif;
    
          /end-free
    
         p fetchNext       e
          *--------------------------------------------------------
          *  closeOrderList  - Close the OrderHdr cursor
          *--------------------------------------------------------
         p closeList       b
    
         d closeList       pi
    
          /free
    
           exec sql
            close MyCursor;
    
          /end-free
    
         p closeList       e
    Attached Files
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

  • #2
    Re: create XML from RPG read as EXCEL

    man that's lame
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: create XML from RPG read as EXCEL

      Thanks Jamie:

      I took your "lame" program and put a little perfume on it.

      It now allows up to 3 files (max 50 fields each) to produce up to 3 worksheets in one workbook. You can call it in batch as follows:
      call xlxml parm(lib1 file1 path lib2 file2 lib3 file3) or
      call xlxml interactively and key in the parms

      File to XLS in XML format

      File 1:
      Lib 1:

      File 2:
      Lib 2:

      File 3:
      Lib 3:

      Output Loc/Name format like /home/aa.xls

      F1=Process F3=End
      Output can be opened with excel
      Code:
        File Listing for:GLSTEST        Extracted on: 2/26/09                                 
      ZONED      PACKED      ALPHA      DATE                      
      FIELD      FIELD       FIELD      FIELD                      
      ZONED      PACKED      ALPHA      DATEFLD                      
      1            1         AAAAA    2009-01-01-00.00.00.000000                    
      -2          -7.1       BBBBB    2008-01-01-00.00.00.000000
      Row 1 is the file name/extract date
      Row 2- is the column headers (up to 3 rows)
      Next row is the field names
      The remainder is data

      Any comments would be appreciated

      Thanks
      GLS
      Attached Files
      Last edited by GLS400; February 26, 2009, 11:24 AM.
      The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

      Comment


      • #4
        Re: create XML from RPG read as EXCEL

        This thing has grown some legs nice job!

        Can you post the XML?
        All my answers were extracted from the "Big Dummy's Guide to the As400"
        and I take no responsibility for any of them.

        www.code400.com

        Comment


        • #5
          Re: create XML from RPG read as EXCEL

          Sure..... See the xml file and jpg snapshot of the opened file. This file has only 1 worksheet

          Best of Luck
          GLS
          Attached Files
          Last edited by GLS400; February 27, 2009, 08:25 AM.
          The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

          Comment


          • #6
            Re: create XML from RPG read as EXCEL

            what version of excel are you on? looks like crap on Excel 2000...which disappoints me greatly
            I'm not anti-social, I just don't like people -Tommy Holden

            Comment


            • #7
              Re: create XML from RPG read as EXCEL

              Hi Tom:

              That's MS Excel 2007.

              It takes a little getting used to but it does have a few nice features. .......
              When you do a filter instead of needing to do a "custom filter" you just Un-check the filtered data which is in a list box.

              Best of Luck
              GLS
              The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

              Comment


              • #8
                Re: create XML from RPG read as EXCEL

                now we need to play with the style sheet (create more colors)
                and input formulas.... gonna need to get office 2007...

                you can still download evaluation for 60 days
                Microsoft support is here to help you with Microsoft products. Find how-to articles, videos, and training for Microsoft Copilot, Microsoft 365, Windows, Surface, and more.


                jamie
                All my answers were extracted from the "Big Dummy's Guide to the As400"
                and I take no responsibility for any of them.

                www.code400.com

                Comment


                • #9
                  Re: create XML from RPG read as EXCEL

                  Hi Jamie:

                  I couldn't find much on style sheet definition. I barely got thru defining "Number" which shows correctly above (right justified) but the packed column should have 2 decimal positons. After 1/2 day of searching I just let it go.

                  If you have a reference link I'd appreciate it.

                  Thanks
                  GLS
                  The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

                  Comment


                  • #10
                    Re: create XML from RPG read as EXCEL

                    i will see what I can dig up....

                    We need to involve Marty in this.......
                    Marty where are you?

                    jamie
                    All my answers were extracted from the "Big Dummy's Guide to the As400"
                    and I take no responsibility for any of them.

                    www.code400.com

                    Comment


                    • #11
                      Re: create XML from RPG read as EXCEL

                      Here are some examples.
                      Try saving your user's spreadsheet as XML file, open the resulting code and try to figure
                      out what it is doing.

                      Code:
                        <Style ss:ID="s23">
                         <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
                         <NumberFormat ss:Format="#,##0"/>
                        </Style>
                      
                        <Cell ss:Index="8" ss:StyleID="s23" ss:Formula="=SUBTOTAL(3,R[2]C:R[12869]C)"><Data
                         ss:Type="Number">1474</Data>
                        </Cell>
                      
                      ...
                       
                        <Style ss:ID="s31">
                         <Alignment ss:Horizontal="Center" ss:Vertical="Top" ss:WrapText="1"/>
                         <Font x:Family="Swiss"/>
                         <Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/>
                         <NumberFormat ss:Format="@"/>
                        </Style>
                      
                      
                        <Cell ss:StyleID="s31"><Data ss:Type="String">Future Units</Data><NamedCell
                          ss:Name="Print_Titles"/><NamedCell ss:Name="_FilterDatabase"/>
                        </Cell>

                      Comment


                      • #12
                        Re: create XML from RPG read as EXCEL

                        You logical son of a b!T@H..........

                        Happy Friday! ALL
                        All my answers were extracted from the "Big Dummy's Guide to the As400"
                        and I take no responsibility for any of them.

                        www.code400.com

                        Comment


                        • #13
                          Re: create XML from RPG read as EXCEL

                          So can you call Bill for me?

                          Comment


                          • #14
                            Re: create XML from RPG read as EXCEL

                            Originally posted by itp View Post
                            So can you call Bill for me?
                            if you do call Bill can you ask him for a more stable OS than Vista
                            I'm not anti-social, I just don't like people -Tommy Holden

                            Comment


                            • #15
                              Re: create XML from RPG read as EXCEL

                              Enable the XML tools in Office Excel 2007 and Office Word 2007

                              1. In Excel or Word, click the Microsoft Office Button Button image , and then click Excel Options or Word Options, depending on the program that you have open.
                              2. Click Personalize.
                              3. Under Top options for working with application name, select Show Developer tab in the Ribbon, and then click OK.

                              Start the XML tools in Office Excel 2007 and Office Word 2007

                              * In either program, on the Developer tab, click any available command in the XML group.

                              Comment

                              Working...
                              X