# Quote Prefix

DsExcel allows you to add a single quote or an apostrophe as a prefix to handle the cell value as text. Learn more in DsExcel Java.

## Content





DsExcel library provides the Quote Prefix feature just like Microsoft Excel. You can add a single quote or an apostrophe as a prefix to handle the cell value as text. The quote prefix remains hidden and only the cell value is visible. The single quote prefix can be seen in the formula bar when the user selects the cell.

Refer to the following example code to see how the quote prefix works in an Excel spreadsheet using DsExcel.

```Java
worksheet.getRange("C4").setValue("00001234");
worksheet.getRange("C5").setValue("Dec-1");

worksheet.getRange("F4").setValue("'006438098");
worksheet.getRange("F5").setValue("'Jan-4");
```

The below image shows the output of a prefixed quote. The quote is displayed in the formula bar whereas the cell hides it.

![Prefixed quote](https://cdn.mescius.io/document-site-files/images/dd59ea42-cd61-4fa6-a018-6231c2a9c598/images/qprefix.png)

The below image shows the output of two prefixed quotes where both the quotes are displayed in the formula bar whereas the cell retains only one.

![Two prefixed quotes](https://cdn.mescius.io/document-site-files/images/dd59ea42-cd61-4fa6-a018-6231c2a9c598/images/qp.png)