Click here to Skip to main content
15,887,746 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionWeb Application Pin
jojoba201128-Nov-12 20:39
jojoba201128-Nov-12 20:39 
Questioniss problem in windoms xp Pin
ramukdin28-Nov-12 20:11
professionalramukdin28-Nov-12 20:11 
SuggestionRe: iss problem in windoms xp Pin
Richard MacCutchan28-Nov-12 23:36
mveRichard MacCutchan28-Nov-12 23:36 
Questioncontrols in ASP.Net Pin
vani1028-Nov-12 8:28
vani1028-Nov-12 8:28 
AnswerRe: controls in ASP.Net Pin
jkirkerx28-Nov-12 12:11
professionaljkirkerx28-Nov-12 12:11 
AnswerRe: controls in ASP.Net Pin
R. Giskard Reventlov28-Nov-12 12:21
R. Giskard Reventlov28-Nov-12 12:21 
AnswerRe: controls in ASP.Net Pin
CommDev8-Dec-12 22:32
CommDev8-Dec-12 22:32 
QuestionMicrosoft Office Excel cannot access the file Pin
umamahesh202027-Nov-12 23:52
umamahesh202027-Nov-12 23:52 
I am getting this while import and exporting data to Excel file

Quote:
Microsoft Office Excel cannot access the file 'C:\usr\SVN\ePROM\EffOnePMA\Files\QuestionStructure.xls'.

There are several possible reasons:
• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name as a currently open workbook.

Here I am Attacheing my code
private void DownLoadStrcture()
        {
            Excel.Application xlApp;
            Excel.Workbook xlWorkBook;
            Excel.Workbook xlTempWorkBook;
            Excel.Worksheet xlWorkSheet;
            Excel.Range range;
            range = null;
            int rCnt = 2;
            int cCnt = 2;
            string str;
            string fname = "QuestionStructure.xls";
            string Filepath = Server.MapPath("~/Files/" + fname);
            string TempFilename = "QuestionStructure_ " + Convert.ToInt32(Session[PageBase.SESSION_USER_ID]) + ".xls";
            string TempFilepath = Server.MapPath("~/Files/Temp/" + TempFilename);
            string dep = ddlDepartment.SelectedItem.Text.ToString();
            string area = ddlArea.SelectedItem.Text.ToString();
            string category = ddlCategory.SelectedValue != "-1" ? ddlCategory.SelectedItem.Text : "";
            string subCategory = ddlSubCategory.SelectedValue != "-1" ? ddlSubCategory.SelectedItem.Text : "";

            xlApp = new Excel.Application();
            xlWorkBook = xlApp.Workbooks.Open(Filepath, 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
            xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
            range = xlWorkSheet.UsedRange;
            File.Copy(Filepath, TempFilepath);

            xlWorkBook.Close();
            xlApp.Quit();
            releaseObject(xlWorkSheet);
            releaseObject(xlWorkBook);
            releaseObject(xlApp);

            xlApp = new Excel.Application();
            xlTempWorkBook = xlApp.Workbooks.Open(TempFilepath, 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
            xlWorkSheet = (Excel.Worksheet)xlTempWorkBook.Worksheets.get_Item(1);
            range = xlWorkSheet.UsedRange;

            str = (string)(range.Cells[rCnt, cCnt] as Excel.Range).Value2;
            string[] stringArray = new string[] { dep, area, category, subCategory };
            for (int i = 0; i < stringArray.Length; i++)
            {
                (range.Cells[rCnt, cCnt] as Excel.Range).Value2 = stringArray[i].ToString();
                str = (string)(range.Cells[rCnt, cCnt] as Excel.Range).Value2;
                rCnt++;
            }
            xlApp.DisplayAlerts = false;
            xlApp.ScreenUpdating = false;
            xlApp.Visible = false;
            xlApp.UserControl = false;
            xlApp.Interactive = false;
            string Deletefilepath = Server.MapPath("~/Files/Temp/");
            if (File.Exists(Deletefilepath + TempFilename))
                File.Delete(Deletefilepath + TempFilename);

            xlTempWorkBook.Close(SaveChanges: true);
            Marshal.ReleaseComObject(xlTempWorkBook);
            xlApp.Quit();
            GC.Collect();
            GC.WaitForPendingFinalizers();
            Marshal.FinalReleaseComObject(xlTempWorkBook);
            Marshal.FinalReleaseComObject(range);
            Marshal.FinalReleaseComObject(xlApp);
            
        }

QuestionhttpModule Type Language Module will not load in Visual Studio debugger Pin
Raimundo2a27-Nov-12 22:50
Raimundo2a27-Nov-12 22:50 
AnswerRe: httpModule Type Language Module will not load in Visual Studio debugger Pin
Richard MacCutchan28-Nov-12 0:10
mveRichard MacCutchan28-Nov-12 0:10 
GeneralRe: httpModule Type Language Module will not load in Visual Studio debugger Pin
Raimundo2a28-Nov-12 4:16
Raimundo2a28-Nov-12 4:16 
QuestionException: System.ServiceModel.ProtocolException: The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8) Pin
indian14327-Nov-12 13:35
indian14327-Nov-12 13:35 
AnswerRe: Exception: System.ServiceModel.ProtocolException: The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8) Pin
jkirkerx28-Nov-12 16:55
professionaljkirkerx28-Nov-12 16:55 
GeneralRe: Exception: System.ServiceModel.ProtocolException: The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8) Pin
indian14329-Nov-12 7:46
indian14329-Nov-12 7:46 
GeneralRe: Exception: System.ServiceModel.ProtocolException: The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8) Pin
jkirkerx29-Nov-12 10:02
professionaljkirkerx29-Nov-12 10:02 
Questionduplicate insert for no reason! Pin
Jassim Rahma27-Nov-12 10:29
Jassim Rahma27-Nov-12 10:29 
QuestionError: Could not load file or assembly 'log4net, Version=1.2.10.0 Pin
Super_Developer26-Nov-12 19:41
Super_Developer26-Nov-12 19:41 
QuestionCould not load file or assembly 'log4net, Version=1.2.10.0 Pin
Super_Developer26-Nov-12 19:38
Super_Developer26-Nov-12 19:38 
AnswerRe: Could not load file or assembly 'log4net, Version=1.2.10.0 Pin
Ali Al Omairi(Abu AlHassan)26-Nov-12 20:58
professionalAli Al Omairi(Abu AlHassan)26-Nov-12 20:58 
GeneralRe: Could not load file or assembly 'log4net, Version=1.2.10.0 Pin
Super_Developer26-Nov-12 23:38
Super_Developer26-Nov-12 23:38 
GeneralRe: Could not load file or assembly 'log4net, Version=1.2.10.0 Pin
Ali Al Omairi(Abu AlHassan)26-Nov-12 23:54
professionalAli Al Omairi(Abu AlHassan)26-Nov-12 23:54 
GeneralRe: Could not load file or assembly 'log4net, Version=1.2.10.0 Pin
Super_Developer27-Nov-12 0:31
Super_Developer27-Nov-12 0:31 
QuestionASP.NET usefull controls Pin
Yoyosch26-Nov-12 19:10
Yoyosch26-Nov-12 19:10 
AnswerRe: ASP.NET usefull controls Pin
batterybuying27-Nov-12 2:38
batterybuying27-Nov-12 2:38 
GeneralRe: ASP.NET usefull controls Pin
gilvani29-Nov-12 4:37
gilvani29-Nov-12 4:37 

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.