GridWeb Need Help

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 Gawaskar,


Thanks for your inquiry.

I am afraid, I could not understand you completely what you require for.

But, one thing is sure, we follow MS Excel standards and in MS Excel, all the visible sheets are rendered when you open an Excel file into it. So, in GridWeb, if a worksheet is not hidden, its corresponding sheet’s tab will be there in the sheet tab bar. You may also hide the sheet tab bar and the sheet tabs will not be shown either for all the sheets (you may use GridWeb.ShowTabBar attribute).

By the way, you may activate a worksheet in the GridWeb by using WebWorksheets.ActiveSheet/ActiveSheetIndex property if can suit you.

Thank you.

Thanks For ur quick reply....

Do u have a sample code to bind the gridweb with excel file "sheet1"? Only i should bind the sheet1 in gridweb...not other than that sheets2,sheets3....!

Thanks & Regards,

Gawaskar.

Hi Aspose Team,

Thanks for your quick reply !

Actuualy my issue is related to processing time.I am having a Excel which having 20 worksheets inside.I am binding this excel file to Asposole.cell.GridWeb by using ImportExcelfile method.

So could you please advise , Instead of whole excel loaded can I make load only specific sheet of excel at run time? So that at least it will take less time as per my understanding.

Regards,

Gawaskar

Hi,


I am afraid, we do not support such a custom oriented feature you are demanding for. Please check my previous reply for details and to know what other options we have in GridWeb instead if it fits your needs. We follow MS Excel standards.

By the way if you are looking for data-binding feature, GridWeb only supports this for data source/database (on the back end) and not for Excel file. It can only imports complete Excel file and not a few sheets.

Thank you.

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.