Click here to Skip to main content
15,889,852 members
Home / Discussions / C#
   

C#

 
AnswerRe: Help me iam getting stack overflow exeception , while my solution build successfully , but it threw the stack overflow error Pin
Jeremy Tierman18-Jun-09 5:08
Jeremy Tierman18-Jun-09 5:08 
GeneralRe: Help me iam getting stack overflow exeception , while my solution build successfully , but it threw the stack overflow error Pin
Edw19-Jun-09 13:06
Edw19-Jun-09 13:06 
AnswerRe: Help me iam getting stack overflow exeception , while my solution build successfully , but it threw the stack overflow error Pin
johannesnestler1-Jul-09 5:32
johannesnestler1-Jul-09 5:32 
QuestionItem collection cannot be modified when datasource property is set Pin
Rahul DSG16-Jun-09 21:05
Rahul DSG16-Jun-09 21:05 
AnswerRe: Item collection cannot be modified when datasource property is set Pin
himanshu256116-Jun-09 21:34
himanshu256116-Jun-09 21:34 
AnswerRe: Item collection cannot be modified when datasource property is set Pin
Morteza Karimian Kelishadrokhi29-Jul-11 3:45
Morteza Karimian Kelishadrokhi29-Jul-11 3:45 
AnswerRe: Item collection cannot be modified when datasource property is set Pin
Morteza Karimian Kelishadrokhi29-Jul-11 8:41
Morteza Karimian Kelishadrokhi29-Jul-11 8:41 
QuestionExport to Excel in not working Pin
binod kumar16-Jun-09 20:48
binod kumar16-Jun-09 20:48 
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.

Binod
AnswerRe: Export to Excel in not working Pin
Ashfield16-Jun-09 20:52
Ashfield16-Jun-09 20:52 
AnswerRe: Export to Excel in not working Pin
moon_stick17-Jun-09 1:28
moon_stick17-Jun-09 1:28 
QuestionAny UI Control like gmail's "to:" textbox? [modified] Pin
Quake2Player16-Jun-09 19:15
Quake2Player16-Jun-09 19:15 
AnswerRe: Any UI Control like gmail's "to:" textbox? Pin
Isaac Gordon16-Jun-09 20:07
Isaac Gordon16-Jun-09 20:07 
QuestionWebcam QR barcode decoder problem [modified] Pin
S K Y16-Jun-09 19:01
S K Y16-Jun-09 19:01 
QuestionHow to hook Adobe reader document using c#? Pin
svt gdwl16-Jun-09 18:33
svt gdwl16-Jun-09 18:33 
QuestionPutting a line of numbers (from a text file) into an array Pin
70superbee16-Jun-09 15:05
70superbee16-Jun-09 15:05 
AnswerRe: Putting a line of numbers (from a text file) into an array Pin
Not Active16-Jun-09 15:56
mentorNot Active16-Jun-09 15:56 
Question"Out of memory exception when loading image with bitmap Pin
Casper Hansen16-Jun-09 10:11
Casper Hansen16-Jun-09 10:11 
AnswerRe: "Out of memory exception when loading image with bitmap Pin
Luc Pattyn16-Jun-09 11:20
sitebuilderLuc Pattyn16-Jun-09 11:20 
GeneralRe: "Out of memory exception when loading image with bitmap Pin
Casper Hansen17-Jun-09 9:13
Casper Hansen17-Jun-09 9:13 
GeneralRe: "Out of memory exception when loading image with bitmap Pin
Luc Pattyn17-Jun-09 9:33
sitebuilderLuc Pattyn17-Jun-09 9:33 
GeneralRe: "Out of memory exception when loading image with bitmap Pin
Casper Hansen19-Jun-09 3:54
Casper Hansen19-Jun-09 3:54 
GeneralRe: "Out of memory exception when loading image with bitmap Pin
Luc Pattyn19-Jun-09 4:18
sitebuilderLuc Pattyn19-Jun-09 4:18 
GeneralRe: "Out of memory exception when loading image with bitmap Pin
Revathij25-Jun-09 22:28
Revathij25-Jun-09 22:28 
GeneralRe: "Out of memory exception when loading image with bitmap Pin
Luc Pattyn25-Jun-09 23:39
sitebuilderLuc Pattyn25-Jun-09 23:39 
QuestionGetting all the nodes in a treeview Pin
Quake2Player16-Jun-09 7:16
Quake2Player16-Jun-09 7:16 

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.