Click here to Skip to main content
15,902,299 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: please helpme Pin
Baran M17-Jun-09 1:12
Baran M17-Jun-09 1:12 
AnswerRe: please helpme Pin
Abhijit Jana17-Jun-09 1:22
professionalAbhijit Jana17-Jun-09 1:22 
QuestionlogOut Problem. Pin
Rahul DSG16-Jun-09 21:10
Rahul DSG16-Jun-09 21:10 
AnswerRe: logOut Problem. Pin
himanshu256116-Jun-09 21:35
himanshu256116-Jun-09 21:35 
AnswerRe: logOut Problem. Pin
Abhijit Jana16-Jun-09 22:02
professionalAbhijit Jana16-Jun-09 22:02 
AnswerRe: logOut Problem. Pin
Baran M16-Jun-09 22:33
Baran M16-Jun-09 22:33 
AnswerRe: logOut Problem. Pin
ais0716-Jun-09 23:59
ais0716-Jun-09 23:59 
QuestionExport to excel is not working on deploying server Pin
binod kumar16-Jun-09 20:50
binod kumar16-Jun-09 20:50 
Hi all

i am doing export to excel operation using below code.

public void ExcelExport(System.Data.DataTable tblExportData, string TempFilePath,string userInfo,bool headerStatus)
{

try

{

Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application();

excelApp.Workbooks.Open(TempFilePath, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);


//Writing Header in Excel

if (headerStatus == true)
{

for (int i = 0; i < tblExportData.Columns.Count; i++)
{

excelApp.Cells[7, i + 1] = tblExportData.Columns[i].ColumnName;

}

}

//Writing Data in Excel

for (int i = 1; i <= tblExportData.Rows.Count; i++)
{

for (int j = 0; j < tblExportData.Columns.Count; j++)
{

string colName = tblExportData.Columns[j].ColumnName;
excelApp.Cells[i + 7, j+1] = tblExportData.Rows[i-1][colName];

}

}

//Create a worksheet object

Microsoft.Office.Interop.Excel.Sheets sheets = excelApp.Worksheets;
//from the collection of worksheet select one worksheet

Microsoft.Office.Interop.Excel.Worksheet mySheet = (Microsoft.Office.Interop.Excel.Worksheet)sheets.get_Item(1);
//select the cell in the worksheet

Microsoft.Office.Interop.Excel.Range myCell1 = (Microsoft.Office.Interop.Excel.Range)mySheet.get_Range("A6", "A6");


myCell1.Value2 = userInfo;

myCell1.Font.Color = System.Drawing.Color.Black.ToArgb();

excelApp.Visible = true;


}

catch (Exception ex)
{

}

}



it's working fine in local. but when i deployed this on server(e.g.relience server) then it stops to work. i mean exporting to excel not working. Even it's not generating any error and page is redirecting also. can any one help me please.

thanks to you all in advance.
AnswerRe: Export to excel is not working on deploying server Pin
Ashfield16-Jun-09 20:59
Ashfield16-Jun-09 20:59 
Questionnot getting the cookie value in next page Pin
anbusenthil16-Jun-09 20:33
anbusenthil16-Jun-09 20:33 
AnswerRe: not getting the cookie value in next page Pin
Vimalsoft(Pty) Ltd16-Jun-09 22:25
professionalVimalsoft(Pty) Ltd16-Jun-09 22:25 
QuestionTreeview control problem Pin
CrazyCoder2616-Jun-09 20:31
CrazyCoder2616-Jun-09 20:31 
AnswerRe: Treeview control problem Pin
Abhijit Jana16-Jun-09 20:39
professionalAbhijit Jana16-Jun-09 20:39 
GeneralRe: Treeview control problem Pin
CrazyCoder2616-Jun-09 21:24
CrazyCoder2616-Jun-09 21:24 
QuestionSQL command parameters size Pin
samerh16-Jun-09 20:28
samerh16-Jun-09 20:28 
AnswerRe: SQL command parameters size Pin
Ravikumar Commuri16-Jun-09 20:34
Ravikumar Commuri16-Jun-09 20:34 
GeneralRe: SQL command parameters size Pin
samerh16-Jun-09 20:45
samerh16-Jun-09 20:45 
QuestionSpell Check Pin
Raveendar Reddy16-Jun-09 20:27
Raveendar Reddy16-Jun-09 20:27 
AnswerRe: Spell Check Pin
Abhijit Jana16-Jun-09 20:42
professionalAbhijit Jana16-Jun-09 20:42 
QuestionData Display Vertically Pin
yesu prakash16-Jun-09 20:21
yesu prakash16-Jun-09 20:21 
AnswerRe: Data Display Vertically Pin
Raveendar Reddy16-Jun-09 20:34
Raveendar Reddy16-Jun-09 20:34 
AnswerRe: Data Display Vertically Pin
Abhijit Jana16-Jun-09 20:45
professionalAbhijit Jana16-Jun-09 20:45 
QuestionCan we use vsflexgrid into asp.net Pin
Bandanenilima16-Jun-09 19:54
Bandanenilima16-Jun-09 19:54 
AnswerRe: Can we use vsflexgrid into asp.net Pin
Ashfield16-Jun-09 21:00
Ashfield16-Jun-09 21:00 
GeneralRe: Can we use vsflexgrid into asp.net Pin
Bandanenilima25-Jun-09 23:38
Bandanenilima25-Jun-09 23:38 

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.