Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Exporting a DataGrid to Excel

  • 11-07-2005 2:22pm
    #1
    Registered Users, Registered Users 2 Posts: 28


    Hey, I'm after writing a database app in C# (not my language of choice) and now I've been asked to export the datagrids to Excel, so they can be printed and such. There's some ASP code for exporting datagrids floating around on the net, but not much on ADO. Any one wanna offer any ideas/help/code etc?


Comments

  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    What version of excel are you using? If it supports xml then the problem is easily solved. If not there are other ways of getting the data in there ;)


  • Moderators, Science, Health & Environment Moderators Posts: 9,054 Mod ✭✭✭✭mewso


    The writer doesn't say in this article but I'm fairly sure it's office xp/2003 only. Might help though.


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    I have code at home that opens an odbc connection to an excel file and allows you to drop a dataset into a named range. I'll look it up tonight.


  • Registered Users, Registered Users 2 Posts: 604 ✭✭✭Kai


    Try this
    http://www.c-sharpcorner.com/Code/2003/Sept/ExportASPNetDataGridToExcel.asp

    I havent tried it myself but it may give you an idea.


Advertisement