# leading zeroes for xls templates

Code for XLS templates that require leading zeros in the output value of a column.

![(blue star)](/files/42399de1a41dacd09fbbc0d1891cf4b0f5acd188)

Instructions

Number-based solution:

```
<style type="text/css">
.kielsCoolCustomFormat{
     mso-number-format: "0000";
}
</style>
<table>
          <tbody>
                   <tr>
                     <td class="kielsCoolCustomFormat">100</td>
                   </tr>
          </tbody> 

</table>
```

Text-based solution:

```
<table>
     <tbody>
          <tr>
           <td>=TEXT("100", "0000")</td>
          </tr>
     </tbody>
</table>

<lineitemsSOQL>
<class>table249</class>
<column>id</column>
<column>name</column>
<column prefix="&nbsp;" >ordernumber__c</column>
<soql>select id, name, ordernumber__c from opportunity</soql>
</lineitemsSOQL>
}}-->
```

{% hint style="info" %}
Highlight important information in a panel like this one. To edit this panel's color or style, select one of the options in the menu.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.sdocs.com/sdocs/template-architecture/document-formats/other-formats/leading-zeroes-for-xls-templates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
