This is a migrated thread and some comments may be shown as answers.

Partial Export2Excel Possible?

3 Answers 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark Galbreath
Top achievements
Rank 2
Mark Galbreath asked on 17 Mar 2010, 06:06 PM
I have a dataset consisting of over 127,000 records and need to split them up so as not to exceed Excel's 65k row limitation.  Is there a way to export a subset of all the records in a radgrid?

The only way I can see to do it now is splitting the data at the database and populating 2 invisible radgrids, and having a 2-part process of exporting their contents.  This seems pretty kludgey to me.

tia,
Mark

3 Answers, 1 is accepted

Sort by
0
Thomas Salt
Top achievements
Rank 1
answered on 17 Mar 2010, 06:14 PM
Perhaps rebinding the datasource while grabbing only the top 65k records?

In SQL the syntax is:
SET ROWCOUNT 65000 
SELECT * FROM MYTABLE 

0
Mark Galbreath
Top achievements
Rank 2
answered on 17 Mar 2010, 06:21 PM
Yeah, you are think along the same lines I am where I would

select * from myTable where rowcount <= 65000;

I am hoping there is some undocumented method in the radgrid.export API I could use to save trips to the database.

I wonder if LINQ to DataSet supports rowcount?

Cheers!
Mark
0
Mike
Top achievements
Rank 1
answered on 13 Jun 2013, 08:22 PM
Why not just export to csv?  I had the same issue and the export to excel was x Times the size of a csv and they both opened MS Excel.
Tags
Grid
Asked by
Mark Galbreath
Top achievements
Rank 2
Answers by
Thomas Salt
Top achievements
Rank 1
Mark Galbreath
Top achievements
Rank 2
Mike
Top achievements
Rank 1
Share this question
or