Displaying formula as text in OWC10 spreadsheet component with VB6

R

Ran

Hi,

I am creating an application with VB6, using OWC10 components and would
like to let users to type in a formula in a cell and then being able to
display the formula as text, within the cell. I have checked if it was
possible to change the cell format to "Text" (which you could do in
std. excel), but OWC10 doesn't support this type. Also, cant find any
property in workbook or worksheet to show formulas as text. Appreciate
if anyone has any idea on how to make it work.

Regards,
Ran
 
A

Alvin Bruney [MVP - ASP.NET]

You can. In design mode, you use the commands and options dialog box to set
the cell contents to the appropriate attribute. If you are loading from a
datasource such as xml, you can set the property at the attribute level.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
 
R

Ran

Hi Alvin,

Thanks for the help.

I have tried setting the cell number format, but I can't find
appropriate type that would display cell formula as a string. There
isn't a "Text" number format, as you would find in Std. Excel.

What I am trying to achieve is, being able to enter a excel formula in
a cell and show it as formula (rather than showing the result of the
formula).

Appreciate your help.

You can. In design mode, you use the commands and options dialog box to set
the cell contents to the appropriate attribute. If you are loading from a
datasource such as xml, you can set the property at the attribute level.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
Ran said:
Hi,

I am creating an application with VB6, using OWC10 components and would
like to let users to type in a formula in a cell and then being able to
display the formula as text, within the cell. I have checked if it was
possible to change the cell format to "Text" (which you could do in
std. excel), but OWC10 doesn't support this type. Also, cant find any
property in workbook or worksheet to show formulas as text. Appreciate
if anyone has any idea on how to make it work.

Regards,
Ran
 
A

Alvin Bruney [MVP - ASP.NET]

That functionality is not supported. However, you can use a hidden column to
put the formula as text. When you need to show it, unhide it and scroll it
into view.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
Ran said:
Hi Alvin,

Thanks for the help.

I have tried setting the cell number format, but I can't find
appropriate type that would display cell formula as a string. There
isn't a "Text" number format, as you would find in Std. Excel.

What I am trying to achieve is, being able to enter a excel formula in
a cell and show it as formula (rather than showing the result of the
formula).

Appreciate your help.

You can. In design mode, you use the commands and options dialog box to
set
the cell contents to the appropriate attribute. If you are loading from a
datasource such as xml, you can set the property at the attribute level.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
Ran said:
Hi,

I am creating an application with VB6, using OWC10 components and would
like to let users to type in a formula in a cell and then being able to
display the formula as text, within the cell. I have checked if it was
possible to change the cell format to "Text" (which you could do in
std. excel), but OWC10 doesn't support this type. Also, cant find any
property in workbook or worksheet to show formulas as text. Appreciate
if anyone has any idea on how to make it work.

Regards,
Ran
 
R

Ran

Thanks for that alvin. Wish Microsoft retained the feature to show
formulas as text. I decided to prefix the formula with ' character,
which would then show the formula as text, excluding the ' character.

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top