We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Edit and save excel in webpage

Hi all,


I am not sure my question is possible or not, I am just asking my idea here.

Is it possible to open an excel spreadhseet in web page (like opening pdf using iframe in asp.net) ,edit and save it again to same path using aspose in ASP.Net?


If there is any possiblity exist, please help.

Hi,



Well, I think you may use our Aspose.Cells.GridWeb control - A grid control that is specifically designed to work on web environments or Asp.NET projects. It is an independent control where you may load Excel files into its grid matrix, create/design worksheets and update/ manipulate the data into the cells in WYSIWYG (visual) manner. It supports all the important features if not everything though. It also supports to read/write and calculate formulas too. It can load and save/re-save the files to Excel files on the fly. See the documents / articles for your reference:
http://www.aspose.com/docs/display/cellsnet/Aspose.Cells.GridWeb

Thank you.

Hi,

Thanks for your posting and considering Aspose.Cells for GridWeb.

Aspose.Cells for GridWeb provides two methods.

GridWeb1.WebWorksheets.ImportExcelFile() method loads file from the server inside the GridWeb

While

GridWeb1.WebWorksheets.SaveToExcelFile() saves GridWeb into a file or memory stream.

You can use these methods to load file from server and save file to server.

I
have attached the sample project that should also be runnable on
Internet Explorer that explains how to load or save file to server from
GridWeb.

Please read the readme.docx file attached by me for more help.

Download Links:


Please also check Aspose.Cells for GridWeb demos from the following link.


In order to run the GridWeb on Internet Explorer, I have added the following line in the head section.



You can also try changing this line into IE9 like this


if (Page.IsPostBack == false && this.GridWeb1.IsPostBack == false)
{
}

what is the significance of this part? I need to load an excel file on a button click, but thats not possible as it causes a postback. when I neglect this,the component is not working nicely



Any other solution?

Thanks

Hi,

Thanks for your posting and using Aspose.Cells.

Page.IsPostBack property tells if the page is loading first time or if it is a post back. Similarly, GridWeb1.IsPostBack tells if the gridweb is being loaded for the first time or if it is post back from Grid itself. For example, if you click the save button of the gridweb, the GridWeb1.IsPostBack property will return true.

The significance of this line is that GridWeb is loaded on a first time only and on subsequent posts back, it is not loaded again. If you will not use this line, then GridWeb will be loaded every time when page_load event is called.

If you are having some problem with your button control using GridWeb, then please provide us simple ASP.NET website, so that we could run it at our end and fix this issue.

Ok I am having issue with button click.


I am attaching the sample website here.


Thanks for the support.

Hi,

Thanks for your sample project and using Aspose.Cells.

Please check the attached fixed project. Now it uses

GridWeb1.ImportExcelFile(filePath);

and not the

GridWeb1.WebWorksheets.ImportExcelFile(filePath);

and it works fine.