Click here to Skip to main content
15,891,938 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: wat is the best solution of getting values from the data base to the grid view. Pin
Imran Khan Pathan23-Jul-08 20:34
Imran Khan Pathan23-Jul-08 20:34 
GeneralRe: wat is the best solution of getting values from the data base to the grid view. Pin
lakshmichawala23-Jul-08 20:38
lakshmichawala23-Jul-08 20:38 
GeneralRe: wat is the best solution of getting values from the data base to the grid view. Pin
Imran Khan Pathan23-Jul-08 20:56
Imran Khan Pathan23-Jul-08 20:56 
GeneralRe: wat is the best solution of getting values from the data base to the grid view. Pin
N a v a n e e t h23-Jul-08 20:40
N a v a n e e t h23-Jul-08 20:40 
AnswerRe: wat is the best solution of getting values from the data base to the grid view. Pin
gurdeep_67723-Jul-08 22:09
gurdeep_67723-Jul-08 22:09 
AnswerRe: wat is the best solution of getting values from the data base to the grid view. Pin
bommareddy20023-Jul-08 23:59
bommareddy20023-Jul-08 23:59 
QuestionAdd Sheet Dynamically while generating Report from ASP.Net in Excel Format. Pin
Binod K23-Jul-08 19:40
Binod K23-Jul-08 19:40 
AnswerRe: Add Sheet Dynamically while generating Report from ASP.Net in Excel Format. Pin
Member 387988123-Jul-08 19:47
Member 387988123-Jul-08 19:47 
This is the sample to create differenct sheets in same excel sheet

try this
Microsoft.Office.Interop.Excel.Application _excel;
Microsoft.Office.Interop.Excel._Workbook _wrkBk;
Microsoft.Office.Interop.Excel._Worksheet _excelSheet;
Microsoft.Office.Interop.Excel.Range _oRng;

//create an object og Excel Application.
_excel = new Microsoft.Office.Interop.Excel.Application();
_excel.Visible = false;
//Get a new workbook.
_wrkBk = (Microsoft.Office.Interop.Excel._Workbook)(_excel.Workbooks.Add(Missing.Value));
_excelSheet = (Microsoft.Office.Interop.Excel._Worksheet)_wrkBk.ActiveSheet;

Microsoft.Office.Interop.Excel._Worksheet _tempSheet = (Microsoft.Office.Interop.Excel.Worksheet)_wrkBk.Worksheets["Sheet1"];
int _defaultSheetCount = _wrkBk.Worksheets.Count;

for (int j = 0; j < dt.Rows.Count; j++)
{
if ((j + 1) <= _defaultSheetCount)
{
_excelSheet = (Microsoft.Office.Interop.Excel.Worksheet)_wrkBk.Worksheets["Sheet" + (j + 1)];
}
else
{
_excelSheet = (Microsoft.Office.Interop.Excel._Worksheet)_wrkBk.Sheets.Add(Type.Missing, _tempSheet, Type.Missing, Type.Missing);
}
_tempSheet = _excelSheet;

//write the data in the predefined format to the Excel Sheet.
_excelSheet.Cells[1, 3] = "test";

Thanks & Regards,
NeW OnE,
please don't forget to vote on the post

Questionhow to divide each row of table in 48 cells Dynamically Pin
Rameez Raja23-Jul-08 17:24
Rameez Raja23-Jul-08 17:24 
AnswerRe: how to divide each row of table in 48 cells Dynamically Pin
Imran Khan Pathan23-Jul-08 19:07
Imran Khan Pathan23-Jul-08 19:07 
QuestionStartup lag.. Pin
Super Lloyd23-Jul-08 14:08
Super Lloyd23-Jul-08 14:08 
AnswerRe: Startup lag.. Pin
N a v a n e e t h23-Jul-08 19:43
N a v a n e e t h23-Jul-08 19:43 
GeneralRe: Startup lag.. Pin
Super Lloyd23-Jul-08 19:57
Super Lloyd23-Jul-08 19:57 
GeneralRe: Startup lag.. Pin
N a v a n e e t h23-Jul-08 20:36
N a v a n e e t h23-Jul-08 20:36 
QuestionSearch Directory Pin
SniperAruba23-Jul-08 11:25
SniperAruba23-Jul-08 11:25 
AnswerRe: Search Directory [modified] Pin
SniperAruba24-Jul-08 5:35
SniperAruba24-Jul-08 5:35 
QuestionSet URL in datagrid HyperLinkField column dynamically Pin
Dan Neely23-Jul-08 9:16
Dan Neely23-Jul-08 9:16 
Questiongoogle translator Pin
rashmithakur23-Jul-08 4:54
rashmithakur23-Jul-08 4:54 
AnswerRe: google translator Pin
Sherin Iranimose23-Jul-08 6:22
Sherin Iranimose23-Jul-08 6:22 
QuestionPOST BACK problem Pin
mys123-Jul-08 4:36
mys123-Jul-08 4:36 
Questionstrange DateTime format Pin
Prog_master23-Jul-08 3:49
Prog_master23-Jul-08 3:49 
AnswerRe: strange DateTime format Pin
Sherin Iranimose23-Jul-08 4:07
Sherin Iranimose23-Jul-08 4:07 
GeneralRe: strange DateTime format Pin
Prog_master23-Jul-08 4:33
Prog_master23-Jul-08 4:33 
QuestionNUnitAddin Problem Pin
Member 451421823-Jul-08 3:37
Member 451421823-Jul-08 3:37 
QuestionHow to avoid Concurrency Problem? Pin
mcmilan23-Jul-08 3:31
mcmilan23-Jul-08 3:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.