Don't want to see the Formulas in the viewer

Hi Team,

I don’t want to see the formulas in the viewer , I just want to see the values .
Can you please suggest is there any way to do that .

image.png (65.9 KB)

@sarathepiq

To hide formulas and display only the values in the viewer using Aspose.Cells, you can convert the workbook to a format that does not display formulas, such as PDF or image formats. Here’s a simple example of how to achieve this:

// Load the workbook
Workbook workbook = new Workbook("input.xlsx");

// Save the workbook as PDF to hide formulas
workbook.Save("output.pdf", SaveFormat.Pdf);

This code will save the workbook as a PDF, which will show only the values and not the underlying formulas. You can also save it as an image if needed, using the following code:

// Save the workbook as an image
workbook.Save("output.png", SaveFormat.Png);

Both methods effectively hide the formulas from the viewer. If you have a specific viewer in mind, please let me know, and I can provide more tailored advice!

@sarathepiq,

Thanks for the screenshot.

I think as a workaround, you may use Aspose.Cells to remove all formulas in the worksheet and replace formulas with their calculated values via worksheet.Cells.RemoveFormulas() method. You can load the file into Aspose.Cells’ object model and then call the mentioned method of your desired worksheet and re-save the Excel file (you may save to streams if you want). Now use Aspose.Cells.GridJs to load the updated Excel file into its grid matrix.

1 Like

Can we do it in client side ?

@sarathepiq,
This feature is only available in Aspose.Cells (server side API), so you may use it as suggested above.

hi Peter, the ticket can be closed. we have done the required code changes in our API’s.

@purushothamj
We are glad to hear that you have supported this feature with your codes.
And we will still try to support this feature in our API.