hey i m jashmin,
i m making project on c#.net VS2010. i want backup to excel from c#............will u give some tips or stuff plz i want to make report from database...........

Recommended Answers

All 11 Replies

hey i m not able to do............plz help me........
means i have purchase form when it working in vs2010,purchase table which is store in database...nw i kept 1 button report in c#.net,vs2010 on click......i want all purchase data in excel 20007.i want all d backup in excel from c#.net using sql20008 database

plz any one help me

INSERT INTO OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\testing.xls;',
'SELECT Name, Date FROM [Sheet1$]')
SELECT [Name], GETDATE() FROM msdb.dbo.sysjobs
GO


hey plz explian me wht is OPENROWSET.THIS IS TAABLE OR WHT???

'Microsoft.Jet.OLEDB.4.0' IS this any varchar ??

'Excel 8.0;Database=C:\testing.xls;' isthis varchar??

'SELECT Name, Date FROM [Sheet1$]' hey whts dis???

hey plz dont get angree .............but i m not getting.......

OPENROWSET is a SQL Server database command.
'Microsoft.Jet.OLEDB.4.0' is telling the command what database driver to use.
'Excel 8.0....' is telling the command where the output goes.
'SELECT ...' is the command that selects the data from the database.

INSERT INTO OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\testing.xls;',
'SELECT Name, Date FROM [Sheet1$]')
SELECT [Name], GETDATE() FROM msdb.dbo.sysjobs
GO


Database=C:\testing.xls;', /dis is sqlserver path wich is displayed when we will start sql......

.but tell me i have to write dis query in sql2008 and execute..............??

99% sure i have to write in sql but here c#.net is in between sql2008,excel.........

means i m keping button on form of vs2010.....i want to click on button that will fetch d data from database and it will displaty on excel.

rly........

What code have you written for your button? Do you know how to connect to a database and run a query?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.