I am astonished, we cannot find a simple way to import a workbook or a worksheet into a wingrid. we are working with 2007.3 but we cannot find a way to simple import as we can easily export to excel.
Is it not implemented? do we have to manually import the worksheet data cell by cell???
please, advise
There is nothing built-in to the grid to do this. This is really not the grid's purview. The grid has no way to interpret an Excel sheet as data. What you would need to do is load the data from your Excel sheet into some data source that the grid can use, like a DataSet, IList, or IBindingList.
well, that is not what you advertised!
Please, check your 2007.3 brochure, it explicitely says:
http://download.infragistics.com/marketing/NetAdvantage/NET/NA73Brochure.pdf
"Our grids provide developers with the power and flexibility necessary to create compelling data display and entry applications in both Windows Forms and Web environments."
Additionally, I remember some pics in the what's new documents with nice arrows telling that it was possible to import excel into the grid capturing everything, not only the data.
What shall we do now? do the work you claimed was in the release or you kindly send us a patch with it built in?
This is not serious at all!
Hi Duetto,
The Infragistics.Excel library has the capability to export and import data to and from Excel. The WinGridExcelExporter component that exports the WinGrid data to Excel w/ a single line of code can do so because we know that the data in the grid is a set structure. With Excel being a cell based grid that contain multiple tables (or data sets), it would make it difficult for us to assume that we could get a Worksheet into a DataSet and then into the WinGrid.
That being said, we have the whole Infragistics.Excel API that let's you manipulate Workbooks, Sheets and Cells. I posted a sample here that show the import and export capability in code:
http://download.infragistics.com/users/samplecode/excelio.zip
If you have any ideas on how we could do an automagic import of the data from a spreadsheet and that it would make sense in the WinGrid, let me know what you think.
Thanks
Jason
Very interesting, can you copy and paste your comments in the brochure and advertisements of your wingrid capabilities?
There are many ways to do the reverse from excel to a grid but your grid does not support multiple layers. The minimum could be to have a worksheet automatically loaded in a wingrid under certain constrains... anyway, your poor excel wrapper get broken very easily for a wide set of 2003 excel workbooks so I understand your limitations now.
have a nice day.
Luis.-
Hi Luis,
wrongly typed in...