export ->Datagrid view -> existing excel file

sonalrane

New member
Joined
Jul 14, 2013
Messages
1
Programming Experience
Beginner
Hi Please help me
I am vb.net developer
m developing small invoice project
i am using datagridview and want to export that data in excel file
but prob is dat i want to export data in preformatted (header , footer in billing format) so please help me , what is efficient way to do it .
thank you

also using visual studio 2008 as frontend and backend as sql server 2005 , data i want to export is in sql table .
 
What I have done in the past is export the datagrid to a generic Excel file and then process it within VB. First, just export the DGV to a plain worksheet with no formatting, just the data. Open that file and record a macro and then format it however you like. Then in VB you can use the same steps that the macro has used to process the file directly from your code. Maybe this isn't the best way to do it, but it worked for my uses just fine.
 
Back
Top