# Export Ledger Dimension in Excel file

**URL:** <https://www.dynamicsuser.net/t/export-ledger-dimension-in-excel-file/59503>\
**Category:** Developer Forum\
**Created:** [January 4, 2016, 8:08pm UTC](https://www.dynamicsuser.net/t/export-ledger-dimension-in-excel-file/59503 "2016-01-04T20:08:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mukti](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@Mukti](https://www.dynamicsuser.net/u/Mukti)\
**Post date:** [January 4, 2016, 8:08pm UTC](https://www.dynamicsuser.net/t/export-ledger-dimension-in-excel-file/59503/1 "2016-01-04T20:08:51Z")

</div>

Hi All,

I am exporting the ledger dimensions in an excel file which are related to expense. The path to see those dimensions are (Travel and Expense → Travel end Expense form → Click any of Expense Report number → “Distirbut amount” button and → Accounting distribution form. Here I have three values in “Ledger Account” field “2550-0123-660861—” but as I run the below code, it only shows two values Department and Cost center every time.

static void TFG\_LedgerDimensionTesting(Args \_args)

{

TrvExpTable tet = TrvExpTable::find(“2550EXP-000000055”);

DimensionAttributeValueSetStorage dimStorage;

Counter i;

dimStorage = DimensionAttributeValueSetStorage::find(tet.DefaultDimension);

for (i=1 ; i\<= dimStorage.elements() ; i++)

{

info (strFmt("%1 = %2", DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name,dimStorage.getDisplayValueByIndex(i)));

pause;

}

}

It never shows three values . Only shows two values. Could anyone please let me know where am I misssing in code ?

 ![0676.Dimension_TE.png](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/7/7015da72b7e08fd7e03e9167f54b680fdaacf87d.png)
