GridWeb Need Help

Hi Amjad,

Thanks a lot for your valuable reply.

sorry if im repeating the same question again and again....

Is that way WorkBook Object can be bind in GridWeb?

Ex: Workbook wb = new Workbook("e:\\test\\Book1.xlsx", loadOptions);

How this Wb object can be bind in Gridweb...?

Please advice..

Thanks for ur help..

Regards,

Gawaskar.

Hi,


Well, since Aspose.Cells and Aspose.Cells.GridWeb are different components (one is library and other is control) and have different sets of data with their own architectures and attributes, so the conversion is not possible.

You may try to save workbook to memory stream using Workbook.Save(stream, ___) method of Aspose.Cells component and then use ImportExcelFile method of GridWeb.WebWorksheets APIs.

Thanks,

Hi,

Could you please help me out by using the below code how can I save a particular sheet in a different file through loadoption class.Please review my below code and comment.

LoadOptions loadOptions = new LoadOptions(LoadFormat.Xlsx);

LoadDataOption dataOption = new LoadDataOption();
dataOption.SheetNames = new string[] { “Sheet2” };
dataOption.ImportFormula = true;
loadOptions.LoadDataOnly = true;
loadOptions.LoadDataOptions = dataOption;

Workbook wb = new Workbook(“e:\test\Book1.xlsx”, loadOptions);

After getting the wb object what is the way to link with

wb.Save(stream, ___) ?

Should we create again a file stream object? If yes how can we link ?

Regards,

Gawaskar

Hi,


Well, your code looks right, once you load a file (using load options for the workbook model) with your specific worksheet in it, you will save the file to stream to do your further tasks. And, yes, if you need to load any other specific worksheets only, you have to re-create/re-fill your load options again to load the file(with specific worksheet(s) in it) again and then create the stream based on it again. One thing you should do, once a task is ended then you should go for other, it will be efficient regarding performance.

Thank you.

Hi Amjad,

Thanks a lot for valuable information.

1 , In My Excel file having Macros and VBA Code script...when i import this excel file to gridweb, Macros and VBA code in excel are not getting reflected inside the GridWeb Excel. Can u advice on this Pls.

2. In GridWeb after importing my excel file if i change the values in cell A1 as value 66 simultaneously in B1 cell values 66 should be displayed or updated in the same worksheet. Can u pls give some suggestion on this two quries.

Thanks & Regards,

Gawaskar N.

gawaskar_n:

Hi Aspose Team,

could you please help me on this GridWeb, i have an single excel file with 10 sheets..i need to bind the single sheet (Say Sheet5) in GridWeb when importing the ImprotExcelFile method in page load...but 10 tabs sheet name should display below on the screen. when i click on each tab its should bind the data according to the sheets in the GridWeb.

Is this possible in this tool....Can u plase advice on this..?

Regards,

Gawaskar.

Hi,

Thanks for using Aspose.Cells for GridWeb.

Well, this feature is not supported by the component. When you will import the workbook using ImportExcelFile() method, it will load the entire workbook with all the worksheets.

However, as a workaround, you should use Aspose.Cells alongwith Aspose.Cells for GridWeb.

You should import the data into a dataset/datatable and then bind the dataset/datatable with your grid. It might not fulfill your needs completely but might help you to find some workaround.

Please see the Databinding GridWeb demos from the following link.


Please also download and use the latest version: Aspose.Cells for GridWeb v2.7.12.2001
gawaskar_n:

1 , In My Excel file having Macros and VBA Code script...when i import this excel file to gridweb, Macros and VBA code in excel are not getting reflected inside the GridWeb Excel. Can u advice on this Pls.



I am afraid, this feature is not supported by both Aspose.Cells and Aspose.Cells.GridWeb. Both of them cannot execute or modify the Macros and VBA Code script.

gawaskar_n:

2. In GridWeb after importing my excel file if i change the values in cell A1 as value 66 simultaneously in B1 cell values 66 should be displayed or updated in the same worksheet. Can u pls give some suggestion on this two quries.


Well, Aspose.Cells for GridWeb will not automatically calculate your values. You will have to manually press the tick button or you will have to submit the gridweb data via postback to make it calculated.

You can choose to do full postback or you can do a partial postback using Ajax.

After postback you will call the following method to run all the formulas.

C#
this.m_GridWeb.WebWorksheets.RunAllFormulas();

Hi,


1) I am afraid, Aspose.Cells.GridWeb control does not support to crate retain/read or execute Macros/VBA codes, so when you import the Excel file to it, it will exclude VBA code or Macros in the template file.

2) I think you may try MS Ajax feature provided by the GridWeb control for your requirement, see the demo for your reference:


If you do not like to use Ms Ajax feature, you have to click on submit button to recalculate all the formulas in the worksheet(s).

Thank you.

Hi,

Thanks !!

Can we make bottom sheet tab on top ? If yes how can we configure?

Regards,

Gawaskar

Hi,

Thanks for your posting and using Aspose.

Do you want to display the sheets tabs on the top of the gridweb screen which are shown at the bottom?

Please clarify.

If I am right, this feature is not available so it cannot be configured too.

We might add a New Feature Request for it in our database if it is what you are seeking.

Hi,

Thanks !

I am facing the problem with calculating the formula.

1. When I am putting the Aspose.Cell.Gridweb inside the Asp.net update panel and I am trying to modify some cell values then that refence formula not being calculated.

2. Actually I want to display the worksheet as per tabcontainer (AjaxControlToolKit) tab clicks. At this time am able to show the sheets as per visible property. But unable to see the recalculate formula values. So could you please guide me weather this tool is being comfortable with AjaxControlToolKit or not ?

Regards,

Gawaskar

gawaskar_n:

Hi,

Thanks !

I am facing the problem with calculating the formula.

1. When I am putting the Aspose.Cell.Gridweb inside the Asp.net update panel and I am trying to modify some cell values then that refence formula not being calculated.

Hi,

Once you have done postback, you must call RunAllFormulas() method to get the correct results.

gawaskar_n:

2. Actually I want to display the worksheet as per tabcontainer (AjaxControlToolKit) tab clicks. At this time am able to show the sheets as per visible property. But unable to see the recalculate formula values. So could you please guide me weather this tool is being comfortable with AjaxControlToolKit or not ?

Regards,

Gawaskar

Aspose.Cells for GridWeb works fine with AJAX. Many customers have implemented AJAX solution with GridWeb. So you should not be facing any issue while using AjaxControlToolKit.

Please see the following thread(s) if it could be any help for you.


Hi Team,

Thanks for your information.

I have one clarification can u help it.

Is it possible to save GridWeb excel file into XML File?

After some Calculation in XML File i can display xml to Gridweb...?

Kindly Advice.

Regards,

Gawaskar.

Hi Team,

Thanks for your information.

I have one clarification can u help it.

Is it possible to save GridWeb excel file into XML File?

After some Calculation in XML File i can display xml to Gridweb...?

Kindly Advice.

Regards,

Gawaskar.

Hi,


Well, Aspose.Cells.GridWeb does support to read and write SpreadsheetML (.xml file) file, you may try it if it fits your needs.

Methods of WebWorksheets that you may try:
  • LoadSpreadSheetMLFile
  • SaveSpreadSheetMLFile
  • ImportExcelFile
  • SaveToExcelFile
Thank you.

Hi,

After implementing the method "SaveSpreadSheetMLFile" the below error is throwing:

Unable to cast object of type 'Aspose.Cells.GridWeb.Data.Picture' to type 'System.Collections.SortedList'.

Actually we are having a image file inside the file.So could you please guide us how to handle this situation?

Regards,

Gawaskar.

Hi,


Well, I am afraid and I think it is the restriction of MS Excel that it cannot render pictures/images in SpreadsheetML (XML Spreadsheet 2003) file. You may confirm it in MS Excel (manually).

So, when you save the file into SpreadsheetML format by GridWeb, it will throw error.

Thanks for your understanding!

Hi All,

Thanks a lot,

we can able to hide or unhide the excel column in Gridweb.?

Kindly advice.

Thanks & Regards,

Gawaskar N.

Hi,


Yes, you can hide/unhide the column in the worksheet programmatically, see the sample code.

Sample code:

WebWorksheet sheet = GridWeb1.WebWorksheets[0];
//Set the first column’s width to 0 to hide it
sheet.Cells.SetColumnWidth(0, new Unit(0, UnitType.Point));

Similarly using SetColumnWidth() method you may unhide a column by specifying your desired width.

Thank you.

Thanks Amjad... Its working i can able to hide the columns now..Thanks a lot..!

One more clarification, Validation can be done on GridWeb For particular cell (Ex:After loading the Excel Inside the GridWeb particular Cell A5 should be only character if i type number any pop up message should display).?

Is this can be achived in Gridweb?

Please help.

Regards,

Gawaskar.

Hi All,

Please provide the solution as per attached screenshot.

Regards,

Gawaskar.