Return a value from a cell to an ASP webpage

Hi Aspose Team,

I've been using your Hello world demo to begin programming a website app that will put values from a webpage into a workbook, make calculations then return the result(s) of specific cell(s) back to the webpage. I'm using your demo .aspx webpages to do this. At the moment I can put data from the webpage into the workbook but I can't figure out how to write the code to return the value of the resultant cell back to the webpage. Can you help?

Many Thanks,

Lee

Hi,


Well, if you need to get calculated value (for the formula), you may call Workbook.CalculateFormula() method after inputting or updating the value in a cell (in the sheet) and before obtaining the cell’s value, see the document for reference:
http://www.aspose.com/docs/display/cellsnet/Calculating+Formulas


Let us know if you need anything else, we will be happy to assist you.

Thank you.

Thanks for the reply,

Do you have an example of how you can return the calculated value from the workbook to the webpage ASP ?

VB Code

workbook.CalculateFormula()
'Get the calculated value of the cell
Dim Result As String = worksheet.Cells("B13").Value.ToString()

APSX webpage code

<% Response.Write(Result) %> for example

Thanks,
Lee

leegarner:

Thanks for the reply,

Do you have an example of how you can return the calculated value from the workbook to the webpage ASP ?

VB Code

workbook.CalculateFormula()
'Get the calculated value of the cell
Dim Result As String = worksheet.Cells("B13").Value.ToString()

APSX webpage code

<% Response.Write(Result) %> for example

Thanks,
Lee

Hi,

Thanks for your input.

I am afraid, your question is not related to Aspose.Cells for .NET.

Actually, you are looking for how to transfer data between ASPX pages. This can be achieved using number of ASP.NET objects.

1 - QueryString (can be used in your case)
2 - Session ( in your scenario, this is best)
3 - Cookies
4 - View State
5 - Application Object

I have searched on internet to recommend you few resources/articles etc. You can search more such articles related to these topics.

ASP.NET State Management Overview - MSDN Link
( http://msdn.microsoft.com/en-us/library/75x4ha6s%28v=vs.100%29.aspx )

( http://www.mikesdotnetting.com/Article/192/Transferring-Data-Between-ASP.NET-Web-Pages )

( http://sanelite.wordpress.com/2011/01/12/difference-between-application-session-view-state-cookies-query-string/ )

Session, Cookies, Viewstate, QueryString, Page Postback in ASP ...

( http://www.youtube.com/watch?v=r0Wz1zR7hyc )