Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am creating an application to get the data written in the excel. But along with this i would like to get the hidden formula from the excel which have been already created. Can someone guide me how would i go with this. I mean are there any specific lib which will help me to get those or is there any way to do it.

I am planning this to write either in VC++ or C# which works in a window platform.Please guide me in building this application.


Thanks in Advance.

What I have tried:

I already have an application to get the data from the pdf,text and doc files. Now i would like to create new or add this functionality to the existing, but I haven't tried anything with regards to excel files.
Posted
Updated 19-Dec-16 1:42am
v2

 
Share this answer
 
The cell's value can be a formula. Try this in your excel interop code (assuming you have excel interop code):

C#
string value = (string)(workbook.ActiveSheet.Cells[row, col].Value2);
 
Share this answer
 
If I understand you correctly

1. Select the cell or range of cells that contain the formulas.
2. Choose Format – Cells to display the Format Cells dialog box. (Alternatively, use Ctrl+1 on the keyboard.)
3. Select the Hidden and Locked check boxes on the Protection tab.
4. Click OK.
5. Choose Tools – Protection – Protect Sheet to display the Protect Sheet dialog box.
6. Make sure that the Protect Worksheet and Contents of Locked Cells check box is selected.
7. Type the password for protecting the worksheet in the Password to Unprotect Sheet text box.
8. Click OK. Excel will display the Confirm Password dialog box.
9. Type the password again, and then click OK.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900