Modify asset listing to output to excel

Hi,


Is there a way for me to modify an asset listing page to output to either a CSV page or a Spreadsheel ML page that can be used with Excel?



Thanks

Sure, just put the following in your design which is applied to the asset listing:

    
    


Then, you just separate your results with commas.

When working with the Asset Listing, I would also suggest going into the Page Contents and type format bodycopies, opening the properties of the bodycopy DIV(s), and changing the "Presentation" setting from "Block-level" to "Raw HTML". Otherwise, you'll have <div> tags scattered throughout your CSV file, which you obviously don't want.


If you have the Raw HTML Content Type asset available in your system, using that content type and not the default "WYSIWYG" content type (also settable from the DIV properties) would also help.

Take a look at this spec. I’ve been building excel reports with MySource lately and this was suggested to me - though big it’s really handy manual.


http://standards.iso.org/ittf/PubliclyAvailableStandards/c051463_ISOIEC%2029500-1_2008(E).zip

I have created native excel spreadsheets in the past based on the ms office xml formats. Below is an example of what you can do.


DESIGN PARSE FILE

    
    
    
    


[b]ASSET LISTING PAGE CONTENTS[/b]
    
    <?xml version="1.0"?>
    <?mso-application progid="Excel.Sheet"?>
    
     
      Aleks Bochniak
      Aleks Bochniak
      Griffith University
      11.6568
     
     
      7000
      10000
      120
      60
      False
      False
     
     
      
       
       
       
       
       
       
      
      
       
    
       
       
       
      
      
       
      
     
     
      
All User details User type Industry Date joined Date last updated Username First name Last name Email Position Work phone Fax Mobile Organisation name Website Organisation size Organisation major focus Street address City State Postcode Office phone
%asset_listing%



 </Table>
  <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
   <Print>
<ValidPrinterInfo/>
<PaperSizeIndex>9</PaperSizeIndex>
<HorizontalResolution>600</HorizontalResolution>
<VerticalResolution>600</VerticalResolution>
   </Print>
   <Selected/>
   <Panes>
<Pane>
 <Number>1</Number>
 <ActiveRow>2</ActiveRow>
</Pane>
   </Panes>
   <ProtectObjects>False</ProtectObjects>
   <ProtectScenarios>False</ProtectScenarios>
  </WorksheetOptions>
 </Worksheet>
</Workbook>





ASSET LISTING TYPE FORMAT


       
    %asset_metadata_User_type%
    %asset_metadata_Industry%
    %asset_created_readable%
    %asset_updated_readable%
    %asset_attribute_username%
    %asset_attribute_first_name%
    %asset_attribute_last_name%
    %asset_attribute_email%
    %asset_metadata_Position%
    %asset_metadata_Work_phone%
    %asset_metadata_Fax%
    %asset_metadata_Mobile%
    %asset_metadata_Organisation_name%
    %asset_metadata_Website%
    %asset_metadata_Organisation_size%
    %asset_metadata_Organisation_major_focus%
    %asset_metadata_Street_address%
    %asset_metadata_City%
    %asset_metadata_State%
    %asset_metadata_Postcode%
    %asset_metadata_Office_phone%
       

I have now put my above post into a decent blog post with an example


http://aleks.bochniak.net/postbox/mysource-matrix/outputting-excel-spreadsheet-xml

Aleks,


Any chance you could put that up on the community site?

Sure mate… gotta find my login details